]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8923 fix dyngroup NO_SUCH_OBJECT error handling
authorHoward Chu <hyc@openldap.org>
Wed, 3 Oct 2018 20:58:32 +0000 (21:58 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 3 Oct 2018 22:23:56 +0000 (22:23 +0000)
servers/slapd/backend.c
tests/data/dynlist.out
tests/scripts/test044-dynlist

index 445a2cb570b0a85d17858fa84b919e4b647a1d36..0a3dafab8f2e0eecc8dbd34d4b8647dab80f4e45 100644 (file)
@@ -1520,7 +1520,7 @@ fe_acl_group(
                                                        op->o_private = o_priv;
                                                        if ( rc2 != 0 ) {
                                                                /* give up... */
-                                                               rc = LDAP_OTHER;
+                                                               rc = (rc2 == LDAP_NO_SUCH_OBJECT) ? rc2 : LDAP_OTHER;
                                                                goto loopit;
                                                        }
                                                }
index 429039b671e86911c29039b510f965e52c49ce5a..8caf0e22ff33b73da785296a447af843e0e94ec6 100644 (file)
@@ -198,6 +198,9 @@ memberURL: ldap:///ou=People,dc=example,dc=com??sub?(objectClass=person)
 # Testing list compare...
 TRUE
 
+# Testing list compare... (should return FALSE)
+FALSE
+
 # Testing list compare (should return FALSE)...
 FALSE
 
index e5a0c47dc5348b7e559c55af44f1e2d543e7ad58..8caf50dedcee7e8b0bdca501297903c45b96b7b6 100755 (executable)
@@ -477,12 +477,12 @@ $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
 RC=$?
 case $RC in
 5)
-       echo "ldapcompare returned FALSE ($RC)!"
-       test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+       echo "ldapcompare returned FALSE ($RC)"
        ;;
 6)
-       echo "ldapcompare returned TRUE ($RC)"
+       echo "ldapcompare returned TRUE ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
        ;;
 0)
        echo "ldapcompare returned success ($RC)!"
@@ -497,6 +497,7 @@ case $RC in
 esac
 echo "" >> $SEARCHOUT
 
+CMPDN="$BJORNSDN"
 echo "Testing list compare (should return FALSE)..."
 echo "# Testing list compare (should return FALSE)..." >> $SEARCHOUT
 $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \