]> git.sur5r.net Git - openldap/commitdiff
fix incorrect bind error (ITS#4129)
authorPierangelo Masarati <ando@openldap.org>
Tue, 1 Nov 2005 09:47:30 +0000 (09:47 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 1 Nov 2005 09:47:30 +0000 (09:47 +0000)
servers/slapd/back-meta/bind.c
tests/scripts/test035-meta

index 071857d3c703b336eee6434ab8d524afab4ad7d4..ccc5483dcc8bf9e73fd755cc7d440c93432582e6 100644 (file)
@@ -184,7 +184,9 @@ meta_back_bind( Operation *op, SlapReply *rs )
                        rs->sr_err = lerr;
                        candidates[ i ].sr_tag = META_NOT_CANDIDATE;
 
-                       if ( META_BACK_ONERR_STOP( mi ) ) {
+                       if ( lerr == LDAP_INVALID_CREDENTIALS
+                               || META_BACK_ONERR_STOP( mi ) )
+                       {
                                rc = rs->sr_err;
                                break;
                        }
index c88b19de5b0a1ab4e6c5106ceecd1d21bc488d20..895644f8737847138abb339bb974f32134bf6d46 100755 (executable)
@@ -545,6 +545,29 @@ case $RC in
        ;;
 esac
 
+echo "Binding with incorrect password to database \"$BASEDN\"..."
+$LDAPWHOAMI -h $LOCALHOST -p $PORT3 \
+       -D "cn=Added User,ou=Same as above,ou=Meta,$BASEDN" \
+       -w bogus >> $TESTOUT 2>&1
+RC=$?
+#if test $RC != 0 ; then
+#      echo "WhoAmI failed ($RC)!"
+#      test $KILLSERVERS != no && kill -HUP $KILLPIDS
+#      exit $RC
+#fi
+case $RC in 
+       0)
+               echo "WhoAmI should have failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit -1
+       ;;
+       51)
+               echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
+       ;;
+       *)
+       ;;
+esac
+
 echo "Comparing to database \"$BASEDN\"..."
 $LDAPCOMPARE -h $LOCALHOST -p $PORT3 \
        "cn=Another Added Group,ou=Groups,$BASEDN" \