#include <ldap.h>
void ldap_set_rebind_proc(
LDAP *ld,
LDAPRebindProc rebindproc)
|
The ldap_set_rebind_proc() call is used to set the entry-point of a routine that will be called back to obtain bind credentials for use when a new server is contacted during the following of an LDAP referral. Note that this function is only available when LDAP_OPT_REFERRALS is set (this is the default). If ldap_set_rebind_proc() is never called, or if it is called with a NULL rebindproc parameter, an unauthenticated simple LDAP bind will always be done when chasing referrals.
rebindproc should be a function that is declared like this:
int rebindproc( LDAP *ld, char **whop, char **credp,
int *methodp, int freeit );
The LDAP library will first call the rebindproc to obtain the referral bind credentials, and the freeit parameter will be zero. The whop, credp, and methodp should be set as appropriate. If the rebindproc returns LDAP_SUCCESS, referral processing continues, and the rebindproc will be called a second time with freeit non-zero to give your application a chance to free any memory allocated in the previous call.
If anything but LDAP_SUCCESS is returned by the first call to the rebindproc, then referral processing is stopped and that error code is returned for the original LDAP operation.
No OS/400 authority is required. All authority checking is done by the LDAP server.
ldap_set_rebind_proc() API does not return an error code.
The following message may be set from this function.
CPF3CF2 E Error(s) occurred during running of ldap_set_rebind_proc API.
ldap_bind() -- Asynchronously bind to the directory (deprecated).
ldap_bind_s() -- Synchronously bind to the directory (deprecated).
ldap_sasl_bind() -- Asynchronously bind to the directory using SASL.
ldap_sasl_bind_s() -- Synchronously bind to the directory using SASL.
ldap_simple_bind() -- Asynchronously bind to the directory using simple authentication.
ldap_simple_bind_s() -- Synchronously bind to the directory using simple authentication.
ldap_unbind() -- Asynchronously unbind from the LDAP server and close the connection.
ldap_unbind_s() -- Synchronously unbind from the LDAP server and close the connection.
|
Top
| LDAP APIs List APIs by category |
| [Information Center Home Page | Feedback ] | [Legal | AS/400 Glossary] |