revert unintended commit

This commit is contained in:
Pierangelo Masarati 2005-01-05 16:25:12 +00:00
parent f5936eb7fc
commit 845cc3d6ee

View File

@ -100,15 +100,26 @@ backsql_bind( Operation *op, SlapReply *rs )
}
e = &user_entry;
a = attr_find( e->e_attrs, password );
if ( a == NULL ) {
if ( ! access_allowed( op, e, password, NULL, ACL_AUTH, NULL ) ) {
#if 1
rs->sr_err = LDAP_INVALID_CREDENTIALS;
#else
rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
#endif
goto error_return;
}
if ( slap_passwd_check( op, e, a, &op->oq_bind.rb_cred,
&rs->sr_text ) != 0 )
{
a = attr_find( e->e_attrs, password );
if ( a == NULL ) {
#if 1
rs->sr_err = LDAP_INVALID_CREDENTIALS;
#else
rs->sr_err = LDAP_INAPPROPRIATE_AUTH;
#endif
goto error_return;
}
if ( slap_passwd_check( op->o_conn, a, &op->oq_bind.rb_cred, &rs->sr_text ) != 0 ) {
rs->sr_err = LDAP_INVALID_CREDENTIALS;
goto error_return;
}