ldap_bind_nmas_s

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_nmas_bind_s (
     LDAP             *ld,
     LDAP_CONST char  *dn,
     LDAP_CONST char  *password,
     LDAP_CONST char  *reqSequence,
     LDAP_CONST char  *reqClearance
  );
  
  

Parameters

ld

(IN) the handle for the LDAP session.

dn

(IN) The dn of the user to be authenticated.

password

(IN) The users password if the requested sequence allows for a password.

reqSequence

(IN) The NMAS login sequence to be used. May be NULL.

reqClearance

(IN) The clearance requested by the client. May be NULL.

Return Values

0x00

LDAP_SUCCESS

Non-zero

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

Remarks

If abortFlag is equal to DIGEST_MD5_FINISH, the function attempts to complete the bind sequence with the server and then frees any memory allocated during the bind process. If abortFlag is equal to DIGEST_MD5_ABORT, the function sends a SASL bind request to the server with a zero length string for the mechanism and no credentials. This signals the server that the bind sequence was aborted by the client. Any allocated memory is also freed.

The LDAP_OPT_NETWORK_TIMEOUT option (by calling ldap_set_option enables you to set a timeout for the initial connection to a server. If no timeout is set, timeout depends upon the underlying socket timeout setting of the operating system.

Using the connection timeout, you can also specify multiple hosts separated by commas in a bind call, then use a timeout to determine how long your application will wait for an initial response before attempting a connection to the next host in the list.

Passing NULL for the ld parameter of ldap_set_option sets this timeout as the default connection timeout for subsequent session handles created with ldap_init or ldapssl_init. To clear the timeout pass NULL for the invalue parameter of ldap_set_option.

A connection timeout will cause an LDAP_SERVER_DOWN error (81) "Can't contact LDAP server".

See Also

ldap_nmas_err2string, ldap_nmas_get_errcode