From 218004aa4b3fb0e500fb1f26f11a61a2377182a3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 22 Nov 2005 11:19:21 +0000 Subject: [PATCH] don't return matchedDN in the case described in ITS#4195 --- tests/data/meta.out | 21 +++++++++++++++++++++ tests/scripts/test035-meta | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/tests/data/meta.out b/tests/data/meta.out index 97b9ed4f06..4826865aa7 100644 --- a/tests/data/meta.out +++ b/tests/data/meta.out @@ -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 diff --git a/tests/scripts/test035-meta b/tests/scripts/test035-meta index 6a2c2d2b2a..f66d5cc984 100755 --- a/tests/scripts/test035-meta +++ b/tests/scripts/test035-meta @@ -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 # -- 2.39.5