ldap_parse_sasl_bind_result()--Extract Server Credentials from SASL Bind Results
Syntax
#include <ldap.h>
int ldap_parse_sasl_bind_result(
LDAP *ld,
LDAPMessage *res,
struct berval **servercredp,
int freeit)
Threadsafe: Yes
|
The ldap_parse_sasl_bind_result() routine is used to obtain server credentials, as a result of an attempt to perform mutual authentication.
Authorities and Locks
No OS/400 authority is required. All authority checking is done by the LDAP server.
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(),ldap_ssl_init(), or ldap_open().
- res
- (Input) Specifies the result of an LDAP operation as returned by ldap_result() or one of the synchronous LDAP API operation calls.
- servercredp
- (Input) Specifies a pointer to a result parameter. For SASL bind results, this result parameter will be filled in with the credentials returned by the server for mutual authentication (if returned). The credentials, if returned, are returned in a struct berval structure. NULL may be supplied to ignore this field.
- freeit
- (Input) Specifies a boolean value that determines if the LDAP result chain (as specified by ref) is to be freed. Any non-zero value will result in the LDAP result chain being freed after the requested information is extracted. Alternatively, the ldap_msgfree() API can be used to free the LDAP result chain at a later time.
- LDAP_SUCCESS
- if the result was successfully located and parsed.
- another LDAP error code
- if not successfully parsed.
Error Conditions
ldap_parse_sasl_bind_result() will return LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.
Error Messages
The following message may be set from this function.
CPF3CF2 E Error(s) occurred during running of ldap_parse_sasl_bind_result API.
ldap_parse_result() -- Extract information from results.