diff --git a/pam_ldap.c b/pam_ldap.c index 6de0ced..73e94f2 100644 --- a/pam_ldap.c +++ b/pam_ldap.c @@ -1683,7 +1683,7 @@ _rebind_proc (LDAP * ld, LDAP_CONST char *url, int request, ber_int_t msgid) userpw.bv_len = (userpw.bv_val != 0) ? strlen (userpw.bv_val) : 0; rc = - ldap_sasl_bind (session->ld, session->info->userdn, LDAP_SASL_SIMPLE, + ldap_sasl_bind (session->ld, who, LDAP_SASL_SIMPLE, &userpw, psrvctrls, 0, &msgid); if ( rc != LDAP_SUCCESS ) { return rc;