1N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1N/A * The contents of this file are subject to the Netscape Public 1N/A * License Version 1.1 (the "License"); you may not use this file 1N/A * except in compliance with the License. You may obtain a copy of 1N/A * Software distributed under the License is distributed on an "AS 1N/A * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 1N/A * implied. See the License for the specific language governing 1N/A * rights and limitations under the License. 1N/A * The Original Code is Mozilla Communicator client code, released 1N/A * The Initial Developer of the Original Code is Netscape 1N/A * Communications Corporation. Portions created by Netscape are 1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All 1N/Astatic char copyright[] =
"@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
1N/A * ldap_bind - bind to the ldap server. The dn and password 1N/A * of the entry to which to bind are supplied, along with the authentication 1N/A * method to use. The msgid of the bind request is returned on success, 1N/A * -1 if there's trouble. Note, the kerberos support assumes the user already 1N/A * has a valid tgt for now. ldap_result() should be called to find out the 1N/A * outcome of the bind request. 1N/A * ldap_bind( ld, "cn=manager, o=university of michigan, c=us", "secret", 1N/A * LDAP_AUTH_SIMPLE ) 1N/A * The bind request looks like this: 1N/A * BindRequest ::= SEQUENCE { 1N/A * name DistinguishedName, -- who 1N/A * authentication CHOICE { 1N/A * simple [0] OCTET STRING -- passwd 1N/A * all wrapped up in an LDAPMessage sequence. 1N/A * ldap_bind_s - bind to the ldap server. The dn and password 1N/A * of the entry to which to bind are supplied, along with the authentication 1N/A * method to use. This routine just calls whichever bind routine is 1N/A * appropriate and returns the result of the bind (e.g. LDAP_SUCCESS or 1N/A * some other error indication). Note, the kerberos support assumes the 1N/A * user already has a valid tgt for now. 1N/A * ldap_bind_s( ld, "cn=manager, o=university of michigan, c=us", 1N/A * "secret", LDAP_AUTH_SIMPLE ) 1N/A * ldap_bind_s( ld, "cn=manager, o=university of michigan, c=us", 1N/A * NULL, LDAP_AUTH_KRBV4 ) 1N/A * return a pointer to the bind DN for the default connection (a copy is 1N/A * not made). If there is no bind DN available, NULL is returned.