ldap_parse_sasl_bind_result

Extracts SASL bind information from an LDAPMessage structure.

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_parse_sasl_bind_result (
     LDAP             *ld,
     LDAPMessage      *res,
     struct berval   **servercredp,
     int               freeit);
  
  

Parameters

ld

(IN) Points to the handle for the LDAP session.

res

(IN) Points to an LDAPMessage containing the results of an LDAP operation.

servercredp

(OUT) Points to the credentials passed back by the LDAP server to use for mutual authentication. When done with the structure, free the memory by calling the ber_bvfree function.

freeit

(IN) Specifies whether the resources allocated by the res parameter are freed.

  • Zero indicates that the resources used by the res parameter are not freed automatically. When you are done with the res parameter, you need to call the ldap_msgfree function to free the memory.

  • Non-zero indicates that memory is freed after the function extracts the information.

Return Values

0x00

LDAP_SUCCESS

Non-zero

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

0x54

LDAP_DECODING_ERROR

0x59

LDAP_PARAM_ERROR

0x5A

LDAP_NO_MEMORY

0x5C

LDAP_NOT_SUPPORTED

Remarks

After calling the ldap_sasl_bind and the ldap_result functions, use the ldap_parse_sasl_bind_result to obtain the SASL bind information.

See Also

ldap_err2string, ldap_parse_extended_result, ldap_parse_result