}
e = &user_entry;
+ 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;
+ }
+
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, e, a, &op->oq_bind.rb_cred,
- &rs->sr_text ) != 0 )
- {
+ 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;
}