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.75 2005/03/10 19:23:02 mast Exp $ + // $Id: client.pike,v 1.76 2005/03/10 19:27:33 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:447: Inside #if undefined(PARSE_RFCS)
   //! 2255.    //!    //! @param context    //! TLS context of connection    //!    //! @seealso    //! @[LDAP.client.bind], @[LDAP.client.search]    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.75 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.76 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap")   #if constant(SSL.Cipher.CipherAlgorithm)    && (lauth->scheme != "ldaps")
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:2184:    // Don't bother lowercasing numeric oids. Names never start with a digit.    if (!(<'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'>)[attr[0]])    attr = lower_case (attr);       if (mapping(string:mixed) descr = standard_attrs != 1 &&    Protocols.LDAP._standard_attr_type_descrs[attr])    return descr;    if (standard_attrs == 2)    return 0;    -  if (!attr_type_descrs) +  if (!attr_type_descrs) { +  attr_type_descrs = ([]);    if (mapping(string:array(string)) subschema =    query_subschema (ldap_basedn, ({"attributeTypes"})))    if (array(string) attr_types = subschema->attributetypes) {       // Note partial code dup with    // Protocols.LDAP._standard_attr_type_descrs init.    array(mapping(string:mixed)) incomplete = ({});    -  attr_type_descrs = ([]); +     foreach (attr_types, string attr_type) {    mapping(string:mixed) descr = parse_schema_terms (    utf8_to_string (attr_type),    (["NAME": "qdescrs",    "DESC": "qdstring",    "OBSOLETE": "flag",    "SUP": "oid",    "EQUALITY": "oid",    "ORDERING": "oid",    "SUBSTR": "oid",
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:2235:    "Got SUP reference to unknown attribute: %O\n", descr);    if (sup_descr->SUP)    complete (sup_descr);    foreach (indices (sup_descr), string term)    if (zero_type (descr[term]))    descr[term] = sup_descr[term];    };    foreach (incomplete, mapping(string:mixed) descr)    complete (descr);    } +  }       return attr_type_descrs[attr];   }      #ifdef PARSE_RFCS      int main (int argc, array(string) argv)   {    // Try to parse a bit of RFC text to generate _ATD_ constants for    // Protocols.LDAP.