#include <ldap.h> int ldap_simple_bind( LDAP *ld, const char *dn, const char *passwd )
The ldap_simple_bind() function is used to authenticate a distinguished name (DN) to a directory server.
For LDAP V2 servers, after a connection is made to an LDAP server by using the ldap_open(), ldap_init(), or ldap_ssl_init() APIs, an LDAP bind API must be called before any other LDAP APIs can be called for that connection. For LDAP V3 servers, the bind is optional.
ldap_simple_bind() is an asynchronous request. The result of the operation can be obtained by a subsequent call to ldap_result().
No i5/OS authority is required. All authority checking is done by the LDAP server.
If ldap_simple_bind() is not successful, -1 will be returned setting the session error (ld_errno) parameters in the LDAP structure appropriately. See LDAP Client API Error Conditions for possible LDAP error code values. Use ldap_get_lderrno() to obtain the error code ld_errno.
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_simple_bind API. |
Top | LDAP APIs | APIs by category |