From: Pierangelo Masarati Date: Thu, 15 Dec 2005 18:07:15 +0000 (+0000) Subject: works with "restrict all": in principle, this slapd should be started without any... X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~590 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=41ae4ec095a2d965bd4192b40ce128a2f781ac97;p=openldap works with "restrict all": in principle, this slapd should be started without any listener, if possible... --- diff --git a/tests/data/slapd-syncrepl-slave-persist-ldap.conf b/tests/data/slapd-syncrepl-slave-persist-ldap.conf index f94fcd7c33..5ab772cfc1 100644 --- a/tests/data/slapd-syncrepl-slave-persist-ldap.conf +++ b/tests/data/slapd-syncrepl-slave-persist-ldap.conf @@ -31,12 +31,14 @@ argsfile @TESTDIR@/slapd.3.args #ldapmod#modulepath ../servers/slapd/back-ldap/ #ldapmod#moduleload back_ldap.la +# We don't need any access to this DSA +restrict all + ####################################################################### # consumer proxy database definitions ####################################################################### database ldap -restrict all suffix "dc=example,dc=com" rootdn "cn=Whoever" uri @URI2@ diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index 85bd1622bd..7e0956838b 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -140,18 +140,27 @@ for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \ '(objectClass=*)' > /dev/null 2>&1 RC=$? - if test $RC = 0 ; then + if test $RC = 0 -o $RC = 53 ; then break fi echo "Waiting 5 seconds for slapd to start..." sleep 5 done -if test $RC != 0 ; then +case $RC in +0 ) + echo "ldapsearch should have failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit -1 + ;; +53) + ;; +*) echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC -fi + ;; +esac echo "Using ldapadd to populate the master directory..." $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \