]> git.sur5r.net Git - openldap/commitdiff
don't return matchedDN in the case described in ITS#4195
authorPierangelo Masarati <ando@openldap.org>
Tue, 22 Nov 2005 11:19:21 +0000 (11:19 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 22 Nov 2005 11:19:21 +0000 (11:19 +0000)
tests/data/meta.out
tests/scripts/test035-meta

index 97b9ed4f067a68677e8619efb1ea05bd94166254..4826865aa71d075cdf188ce3e1c9de9b8e2809a1 100644 (file)
@@ -429,6 +429,27 @@ telephoneNumber: +1 313 555 5331
 
 # refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
 
+# searching base="ou=Meta,o=Example,c=US"...
+dn: cn=Dan Aykroyd,ou=Meta,o=Example,c=US
+objectClass: inetOrgPerson
+cn: Dan Aykroyd
+sn: Aykroyd
+userPassword:: ZWx3b29k
+description: Elwood Blues
+
+dn: cn=John Belushi,ou=Meta,o=Example,c=US
+objectClass: inetOrgPerson
+cn: John Belushi
+sn: Belushi
+userPassword:: amFjaw==
+description: Joliet Jack Blues
+
+dn: ou=Meta,o=Example,c=US
+objectClass: organizationalUnit
+ou: Meta
+
+# refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
+
 # searching base="o=Example,c=US"...
 dn: cn=Added Group,ou=Groups,o=Example,c=US
 objectClass: groupOfNames
index 6a2c2d2b2a533ab092ef12c9acddd5d21f5f50a3..f66d5cc984c00651a86600fe9aa2e3a8bd5142bf 100755 (executable)
@@ -161,6 +161,33 @@ case $RC in
        ;;
 esac
 
+# ITS#4195: spurious matchedDN when the search scopes the main target,
+# and the searchBase is not present, so that target returns noSuchObject
+BASEDN="ou=Meta,o=Example,c=US"
+echo "Searching base=\"$BASEDN\"..."
+echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 -b "$BASEDN" >> $SEARCHOUT 2>&1
+RC=$?
+#if test $RC != 0 ; then
+#      echo "Search failed ($RC)!"
+#      test $KILLSERVERS != no && kill -HUP $KILLPIDS
+#      exit $RC
+#fi
+case $RC in 
+       0)
+       ;;
+       51)
+               echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit 0
+       ;;
+       *)
+               echo "Search failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       ;;
+esac
+
 #
 # Do some modifications
 #