]> git.sur5r.net Git - openldap/commitdiff
revert unintended commit
authorPierangelo Masarati <ando@openldap.org>
Wed, 5 Jan 2005 16:25:12 +0000 (16:25 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 5 Jan 2005 16:25:12 +0000 (16:25 +0000)
servers/slapd/back-sql/bind.c

index 45b60659f034758801a63131a95544c10877cbdd..ce4edaf83c74d4634ff99eaf5fdbf73068922319 100644 (file)
@@ -100,15 +100,26 @@ backsql_bind( Operation *op, SlapReply *rs )
        }
        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;
        }