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.47 2003/02/07 01:00:38 nilsson Exp $ + // $Id: client.pike,v 1.48 2003/04/07 17:12:02 nilsson 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:343:    //! @decl void create(string url, object context)    //!    //! Create object. The first optional argument can be used later    //! for subsequence operations. The second one can specify    //! TLS context of connection. The default context only allows    //! 128-bit encryption methods, so you may need to provide your    //! own context if your LDAP server supports only export encryption.    //!    //! @param url    //! LDAP server URL in form -  //! @tt{"ldap://hostname/basedn?attrlist?scope?ext"@} +  //! @expr{"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.47 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.48 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;       lauth = parse_url(url);       if(!stringp(lauth->scheme) ||    ((lauth->scheme != "ldap")   #if constant(SSL.sslfile)    && (lauth->scheme != "ldaps")
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:463:    //! @param dn    //! The distinguished name (DN) of an entry aginst which will    //! be made authentication.    //! @param password    //! Password used for authentication.    //!    //! Third form allows specify the version of LDAP protocol used    //! by connection to the LDAP server.    //!    //! @param version -  //! Only @tt{2@} or @tt{3@} can be entered. +  //! Only @expr{2@} or @expr{3@} can be entered.    //!    //! @returns -  //! Returns @tt{1@} on success, @tt{0@} otherwise. +  //! Returns @expr{1@} on success, @expr{0@} otherwise.    //!    //! @note    //! Only simple authentication type is implemented. So be warned    //! clear text passwords are sent to the directory server.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int bind (string|void dn, string|void password, int|void version) {   
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:551:       }       //!    //! Deletes entry from the LDAP server.    //!    //! @param dn    //! The distinguished name of deleted entry.    //!    //! @returns -  //! Returns @tt{1@} on success, @tt{0@} otherwise. +  //! Returns @expr{1@} on success, @expr{0@} otherwise.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int delete (string dn) {       int id;    mixed raw;       if (chk_ver())
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:610:    //!    //! Compares given attribute value with one in the directory.    //!    //! @param dn    //! The distinguished name of compared entry.    //!    //! @param aval    //! The mapping of compared attributes and theirs values.    //!    //! @returns -  //! Returns @tt{1@} on success, @tt{0@} otherwise. +  //! Returns @expr{1@} on success, @expr{0@} otherwise.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int compare (string dn, array(string) aval) {       int id;    mixed raw;       // if (!aval || sizeof(aval)<2)
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:684:    //! of an entry into the directory    //!    //! @param dn    //! The Distinguished Name of the entry to be added.    //!    //! @param attrs    //! The mapping of attributes and their values that make up the content    //! of the entry being added.    //!    //! @returns -  //! Returns @tt{1@} on success, @tt{0@} otherwise. +  //! Returns @expr{1@} on success, @expr{0@} otherwise.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int add (string dn, mapping(string:array(string)) attrs) {       int id;    mixed raw;       if (chk_ver())
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:931:    //!    //! @param attrs    //! The array of attribute names which will be returned by server.    //! for every entry.    //!    //! @param attrsonly    //! The flag causes server return only attribute name but not    //! the attribute values.    //!    //! @returns -  //! Returns object @[LDAP.client.result] on success, @tt{0@} +  //! Returns object @[LDAP.client.result] on success, @expr{0@}    //! otherwise.    //!    //! @note    //! For syntax of search filter see at RFC 1960    //! (http://community.roxen.com/developers/idocs/rfc/rfc1960.html).    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    //!
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1183:    //! @param deleteoldrdn    //! The parameter controls whether the old RDN attribute values    //! are to be retained as attributes of the entry, or deleted    //! from the entry.    //!    //! @param newsuperior    //! If present, this is the Distinguished Name of the entry    //! which becomes the immediate superior of the existing entry.    //!    //! @returns -  //! Returns @tt{1@} on success, @tt{0@} otherwise. +  //! Returns @expr{1@} on success, @expr{0@} otherwise.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int modifydn (string dn, string newrdn, int deleteoldrdn,    string|void newsuperior) {       mixed raw;       if (chk_ver())
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1243:    //! delete values listed from the given attribute, removing the entire    //! attribute if no values are listed, or if all current values    //! of the attribute are listed for deletion    //! 2 (LDAP_OPERATION_REPLACE) -    //! replace all existing values of the given attribute with the new    //! values listed, creating the attribute if it did not already exist.    //! A replace with no value will delete the entire attribute if it    //! exists, and is ignored if the attribute does not exist    //!    //! @returns -  //! Returns @tt{1@} on uccess, @tt{0@} otherwise. +  //! Returns @expr{1@} on uccess, @expr{0@} otherwise.    //!    //! @note    //! The API change: the returning code was changed in Pike 7.3+    //! to follow his logic better.    int modify (string dn, mapping(string:array(mixed)) attropval) {       int id;    mixed raw;       if (chk_ver())
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1286:    last_rv = result(({raw}));    DWRITE_HI(sprintf("client.MODIFY: %s\n", last_rv->error_string()));    seterr (last_rv->error_number());    return (!last_rv->error_number());       } // modify       //! Gets referrals.    //!    //! @returns -  //! Returns array of referrals or @tt{0@}. +  //! Returns array of referrals or @expr{0@}.    array|int get_referrals() {    if(last_rv->referrals)    return last_rv->referrals;    return 0;    }       //! @param ldapuri    //! LDAP URL    mapping|int parse_url (string ldapuri) {