pike.git / lib / modules / Protocols.pmod / LDAP.pmod / client.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1:   #pike __REAL_VERSION__      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.97 2005/04/25 19:48:43 mast Exp $ + // $Id: client.pike,v 1.98 2006/05/10 12:17:37 mast Exp $   //   // Honza Petrous, hop@unibase.cz   //   // ----------------------------------------------------------------------   //   // History:   //   // v0.0 1998-05-25 Starting up!   // v1.0 1998-06-21 Core functions (open, bind, unbind, delete, add,   // compare, search), only V2 operations,
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:553: Inside #if undefined(PARSE_RFCS)
   //! @[Protocol.LDAP.parse_ldap_url].    //!    //! @param context    //! TLS context of connection    //!    //! @seealso    //! @[LDAP.client.bind], @[LDAP.client.search]    void create(string|mapping(string:mixed)|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.97 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.98 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       if (mappingp (url))    lauth = url;    else    lauth = parse_ldap_url(url);       if(!stringp(lauth->scheme) ||
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1971:    string str,    mapping(string:string|multiset(string)) known_terms,    string errmsg_prefix)   // Parses a string containing a parenthesized list of terms as used in   // several schema related attributes. The known_terms mapping   // specifies the syntax of the known terms. If there's an entry "" in   // it it's used for all other encountered terms.   {    string orig_str = str, oid;    -  // Doin a slightly lax check of the oid syntax here. -  if (!sscanf (str, "(%*[ ]%[0-9.]%*[ ]%s", oid, str)) +  // RFC 2252 mandates a dotted decimal oid here, but some servers +  // (e.g. iPlanet) might use symbolic strings so we have to do a lax +  // syntax check. +  // +  // Note: Maybe it would be convenient to lowercase the noncompliant +  // oids in such cases, to make later lookups easier. However there +  // are no docs saying that it's ok to do so, and I prefer to play +  // safe. /mast +  if (!sscanf (str, "(%*[ ]%[-;a-zA-Z0-9.]%*[ ]%s", oid, str))    ERROR ("%sExpected '(' at beginning: %O\n",    errmsg_prefix, orig_str);    if (!sizeof (oid))    ERROR ("%sNumeric object identifier missing at start: %O\n",    errmsg_prefix, orig_str);       mapping(string:mixed) res = (["oid": oid]);       do {    int pos = sizeof (str);
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:2177:   //! Returns a mapping where the indices are the terms that the   //! server has returned and the values are their values on string   //! form (dequoted and converted from UTF-8 as appropriate). Terms   //! without values get @expr{1@} as value in the mapping.   //!   //! The mapping might contain the following members (all except   //! @expr{"oid"@} are optional):   //!   //! @mapping   //! @member string "oid" - //! The object identifier on string form (i.e. a dotted decimal - //! string). + //! The object identifier on string form. According to the RFC, + //! this should always be a dotted decimal string. However some + //! LDAP servers, e.g. iPlanet, allows registering attributes + //! without an assigned OID. In such cases this can be some other + //! string. In the case of iPlanet, it uses the attribute name + //! with "-oid" appended (c.f. + //! http://docs.sun.com/source/816-5606-10/scmacfg.htm).   //! @member string "NAME"   //! Array with one or more names used for the attribute.   //! @member string "DESC"   //! Description.   //! @member string "OBSOLETE"   //! Flag.   //! @member string "SUP"   //! Derived from this other attribute. The value is the name or   //! oid of it. Note that the attribute description from the   //! referenced type always is merged with the current one to make