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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:486:    //!    //! @note    //! In Pike 7.6 and earlier, the special @expr{"dn"@} entry was    //! incorrectly returned in UTF-8 encoded form for LDAPv3    //! connections.    //!    //! @seealso    //! @[fetch_all]    ResultEntry fetch(int|void idx)    { -  -  if (!zero_type (idx)) actnum = idx; +  if (!undefinedp (idx)) actnum = idx;    if (actnum >= num_entries() || actnum < 0) return 0;       if (ldap_version < 3)    return entry[actnum];       ResultEntry ent = entry[actnum];       if (actnum == first_undecoded_entry) {    decode_entry (ent);    first_undecoded_entry++;
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1172:   //! @note   //! This function intentionally does not try to simplify the return   //! values for single-valued attributes (c.f.   //! @[Protocols.LDAP.SEARCH_MULTIVAL_ARRAYS_ONLY]). That since (at   //! least) Microsoft AD has a bunch of attributes in the root DSE   //! that they don't bother to provide schema entries for. The return   //! value format wouldn't be reliable if they suddenly change that.   {    attr = lower_case (attr);    -  if (!root_dse || zero_type (root_dse[attr])) { +  if (!root_dse || !has_index (root_dse, attr)) {    PROFILE("get_root_dse_attr", {       multiset(string) attrs = root_dse ? (<>) :    // Get a bunch of attributes in one go.    (<    // Request all standard operational attributes (RFC 2252,    // section 5.1). Some of them are probably not applicable    // in the root DSE, but better safe than sorry.    "createtimestamp",    "modifytimestamp",
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:2444:    string sup = lower_case (descr->SUP);    mapping(string:mixed) sup_descr =    attr_type_descrs[sup] ||    (standard_attrs != 1 && _standard_attr_type_descrs[sup]);    if (!sup_descr)    ERROR ("Inconsistency in schema: "    "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])) +  if (!has_index (descr, term))    descr[term] = sup_descr[term];    };    foreach (incomplete, mapping(string:mixed) descr)    complete (descr);    }    }       return attr_type_descrs[attr];   }