ldap_bind_s

Synchronously authenticates a specified entry to the directory. This function has been deprecated; use the ldap_simple_bind_s 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_s (
     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

0x00

LDAP_SUCCESS

Non-zero

Failure. For a complete list, see LDAP Return Codes.

0x54

LDAP_DECODING_ERROR

0x56

LDAP_AUTH_UNKNOWN

0x59

LDAP_PARAM_ERROR

0x5A

LDAP_NO_MEMORY

0x5C

LDAP_NOT_SUPPORTED

See Also

ldap_simple_bind, ldap_unbind, ldap_unbind_s, ldap_unbind_ext, ldap_unbind_ext_s