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.21 2000/10/11 11:55:36 hop Exp $ + // $Id: client.pike,v 1.22 2001/01/04 12:43:20 hop 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:153:    // rawres: array of result in raw format, but WITHOUT LDAP PDU !!!    // stuff: 1=bind result; ...       int lastel = sizeof(rawres) - 1;       if (lastel < 0) {    ::seterr (LDAP_LOCAL_ERROR);    THROW(({"LDAP: Internal error.\n",backtrace()}));    return(-::ldap_errno);    } -  //DWRITE(sprintf("DEB: lastel=%d\n",lastel)); +     DWRITE(sprintf("result.create: rawres=%O\n",rawres[lastel]));       // The last element of 'rawres' is result itself    resultcode = ASN1_DECODE_RESULTCODE(rawres[lastel]);    DWRITE(sprintf("result.create: code=%d\n",resultcode));    #if 0    resultstring = ASN1_DECODE_RESULTSTRING(rawres[lastel]);    DWRITE(sprintf("result.create: resstr=%s\n",resultstring));    #endif    // referral (v3 mode)
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:653:    while(filter[-1] == ' ')    filter = reverse(reverse(filter)[1..]);       // strip leading and trailing brackets   #if 1    if(filter[0] == '(') {    int ix;    string f2 = reverse(filter[1..]);    if((ix = predef::search(f2, ")")) > -1) {    filter = reverse(f2[ix+1..]); - //DWRITE("DEB: make_filter: filter=["+filter+"]\n"); +     return(make_filter(filter));    }    return(-1); // error in filter expr.    }   #endif       op = -1;       DWRITE(sprintf("client.make_filter: ftype=%c\n",filter[0]));    switch (filter[0]) {
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:703:       object msgval, ofilt;    array(object) ohlp;       if(!objectp(ofilt = make_filter(filter))) {    return(-seterr(LDAP_FILTER_ERROR));    }    ohlp = ({ofilt});    if (arrayp(attrs)) { //explicitly defined attributes    array(object) o2 = ({}); -  //DWRITE(sprintf("DEB: attrs=%O\n",attrs)); +     foreach(attrs, string s2)    o2 += ({Standards.ASN1.Types.asn1_octet_string(s2)});    ohlp += ({Standards.ASN1.Types.asn1_sequence(o2)});    } else    ohlp += ({Standards.ASN1.Types.asn1_sequence(({}))});       msgval = ASN1_APPLICATION_SEQUENCE(3,    ({ Standards.ASN1.Types.asn1_octet_string(basedn),    ASN1_ENUMERATED(scope),    ASN1_ENUMERATED(deref),