ldap_bind

Asynchronously authenticates a specified entry to the directory. This function has been deprecated; use the ldap_simple_bind function.

LDAP Version:v2 or higher
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_bind (
     LDAP         *ld,
     const char   *dn,
     const char   *cred,
     int           method);
  
  

Parameters

ld

(IN) Points to the handle for the LDAP session which is returned by either the ldap_open or ldap_init function.

dn

(IN) Points to the distinguished name of the entry to use for authentication, for example: "o=novell", "ou=provo", "cn=kim"

cred

(IN) Points to the credentials to use for authentication

method

(IN) Specifies the authentication method. eDirectory supports the following methods:

  • LDAP_AUTH_NONE (0x00)— no authentication

  • LDAP_AUTH_SIMPLE (0x80)—context specific + primitive

Return Values

>0

Message ID of operation

-1

Failure

See Also

ldap_simple_bind, ldap_unbind, ldap_unbind_s, ldap_unbind_ext, ldap_unbind_ext_s