Extracts SASL bind information from an LDAPMessage structure.
#include <ldap.h>
int ldap_parse_sasl_bind_result (
LDAP *ld,
LDAPMessage *res,
struct berval **servercredp,
int freeit);
(IN) Points to the handle for the LDAP session.
(IN) Points to an LDAPMessage containing the results of an LDAP operation.
(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.
(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.
|
0x00 |
LDAP_SUCCESS |
|
Non-zero |
Failure. For a complete list, see |
|
0x54 |
LDAP_DECODING_ERROR |
|
0x59 |
LDAP_PARAM_ERROR |
|
0x5A |
LDAP_NO_MEMORY |
|
0x5C |
LDAP_NOT_SUPPORTED |
After calling the ldap_sasl_bind and the ldap_result functions, use the ldap_parse_sasl_bind_result to obtain the SASL bind information.