From 845cc3d6eef5b9742028afa3013f207ed296e550 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 5 Jan 2005 16:25:12 +0000 Subject: [PATCH] revert unintended commit --- servers/slapd/back-sql/bind.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-sql/bind.c b/servers/slapd/back-sql/bind.c index 45b60659f0..ce4edaf83c 100644 --- a/servers/slapd/back-sql/bind.c +++ b/servers/slapd/back-sql/bind.c @@ -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; } -- 2.39.5