#include <lber.h> #include <ldap.h>int ldap_simple_bind(LDAP
ld, char
who, char
passwd);
int ldap_simple_bind_s(LDAP
ld, char
who, char
passwd);
Simple authentication, if used, sends a cleartext password to the LDAP server.
The ld parameter is the LDAP session identifier as returned from ldap_init or ldap_open.
The who parameter is the DN (distinguished name) of the user being authenticated. For an anonymous bind, the who parameter may be set to NULL or to a pointer to a null string ("").
The passwd parameter is the password associated with the user. If no password is required or an anonymous bind is being performed, the passwd parameter should be set to NULL or to a pointer to a null string ("").
ldap_simple_bind_s returns LDAP_SUCESS upon successful completion, otherwise an LDAP error indication (see ldap_perror(3ldap) for details).