From 22b6248c8d13543148ca56a3b8faa5ecda0bc572 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 20 Nov 2005 14:25:52 +0000 Subject: [PATCH] fix library checks; implement client side of "touch" modify (ITS#4183) --- tests/scripts/test004-modify | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify index 649fde2c5a..de2952569c 100755 --- a/tests/scripts/test004-modify +++ b/tests/scripts/test004-modify @@ -165,6 +165,10 @@ uidNumber: 1 increment: gidNumber gidNumber: -1 +dn: dc=example,dc=com +changetype: modify +# EMPTY SEQUENCE OF CHANGE + EOMODS RC=$? @@ -174,6 +178,31 @@ if test $RC != 0 ; then exit $RC fi +echo "Using ldapmodify to add an empty entry (should fail with protocolError)..." +$LDAPMODIFY -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD \ + >> $TESTOUT 2>&1 << EOMODS +dn: cn=Foo Bar,dc=example,dc=com +changetype: add +# EMPTY SEQUENCE OF ATTRS +EOMODS + +RC=$? +case $RC in +2) + echo " ldapmodify failed ($RC)" + ;; +0) + echo " ldapmodify should have failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit -1 + ;; +*) + echo " ldapmodify failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + ;; +esac + echo "Using ldapsearch to retrieve all the entries..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ 'objectClass=*' > $SEARCHOUT 2>&1 -- 2.39.5