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.34 2001/11/21 16:22:41 anders Exp $ + // $Id: client.pike,v 1.35 2002/01/23 06:52:48 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:117:    class result // ------------------    {       private int resultcode = LDAP_SUCCESS;    private string resultstring;    private int entrycnt = 0;    private int actnum = 0;    private array(mapping(string:array(string))) entry = ({});    array(string) referrals;    +  private string utf2s(string in) { +  // catched variant of utf8_to_string needed for tagged octed string data +  +  string out = ""; +  catch( out = utf8_to_string(in) ); +  return out; +  +  } +     private array _get_attr_values(int ver, object x) {       array res = ({});       if(!sizeof(x->elements))    return(res);    foreach(x->elements[1]->elements, object val1)    res += ({ val1->value });    if(ver == 3) {    // deUTF8 -  res = Array.map(res, utf8_to_string); +  res = Array.map(res, utf2s);    }    return(res);    }       private array _New_decode(array ar) {       array res = ({});    array entry1;    mapping attrs;    object oder;
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:342:    //! @tt{"ldap://hostname/basedn?attrlist?scope?ext"@}    //!    //! @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.34 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.35 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap") && (lauth->scheme != "ldaps"))) {    THROW(({"Unknown scheme in server URL.\n",backtrace()}));    }