]> git.sur5r.net Git - openldap/commitdiff
more whoami tests
authorPierangelo Masarati <ando@openldap.org>
Tue, 27 Apr 2004 22:47:41 +0000 (22:47 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 27 Apr 2004 22:47:41 +0000 (22:47 +0000)
tests/scripts/test014-whoami

index fb194244fc3134ba864607e625b08fa0b9fff78f..ae9fd28191b95d278fb9537e651b9cdfa40b2e5f 100755 (executable)
@@ -374,6 +374,20 @@ if test $RC != 1 ; then
        exit $RC
 fi
 
+BINDDN="cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc=com"
+BINDPW=bjorn
+AUTHZID="dn:cn=Should Fail,dc=example,dc=com"
+echo "Testing ldapwhoami as ${BINDDN} for ${AUTHZID} (URI; should fail)..."
+$LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $BINDPW \
+       -e \!authzid="$AUTHZID"
+
+RC=$?
+if test $RC != 1 ; then
+       echo "ldapwhoami failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"