X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest041-aci;h=0ba871e78c4c5946cff4e347ad2836154fedd3fa;hb=0dfc478cdf55c5b77203997f69ff98a40cef715f;hp=0329c5ccae3c053d70eef8dca246ff5f3d9fe819;hpb=40c0d3bfa33d9e5102da75e5ab148df237df3be7;p=openldap diff --git a/tests/scripts/test041-aci b/tests/scripts/test041-aci index 0329c5ccae..0ba871e78c 100755 --- a/tests/scripts/test041-aci +++ b/tests/scripts/test041-aci @@ -19,13 +19,14 @@ bdb|hdb|ldbm) *) echo "Test does not support $BACKEND backend" exit 0 + ;; esac echo "running defines.sh" . $SRCDIR/scripts/defines.sh if test "$ACI" = "acino" ; then - echo "ACI not enabled; skipping..." + echo "ACI not enabled, test skipped" exit 0 fi @@ -49,6 +50,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID" +sleep 1 + echo "Testing slapd ACI access control..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ @@ -78,8 +81,11 @@ $LDAPSEARCH -s base -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ '(objectclass=*)' >> $SEARCHOUT 2>> $TESTOUT RC=$? if test $RC != 32 ; then - echo "ldapsearch should have failed ($RC)!" + echo "ldapsearch should have failed with noSuchObject ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS + if test $RC = 0 ; then + exit -1 + fi exit $RC fi @@ -92,7 +98,7 @@ RC=$? if test $RC = 0 ; then echo "ldapwhoami should have failed!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit -1 fi # Populate ACIs