]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test032-chain
check for overflows
[openldap] / tests / scripts / test032-chain
index e03d55d1da6e0887ada3af27a16ae775bbaa1064..1a8190ed56c1cc9df0eb1f560a7cd98b9579b5d7 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2006 The OpenLDAP Foundation.
+## Copyright 1998-2008 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -128,7 +128,7 @@ for P in $PORT1 $PORT2 ; do
                exit 1
        fi
 
-       echo "Reading the referral entry "ou=Other,$BASEDN" as anonymous on port $P..."
+       echo "Reading the referral entry \"ou=Other,$BASEDN\" as anonymous on port $P..."
        $LDAPSEARCH -h $LOCALHOST -p $P -b "ou=Other,$BASEDN" -S "" \
                 > $SEARCHOUT 2>&1
 
@@ -304,6 +304,31 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+# ITS#57??
+$LDAPADD -h $LOCALHOST -p $PORT1 \
+       -D "$MANAGERDN" -w secret \
+       >> $TESTOUT 2>&1 \
+       << EOMODS
+dn: ou=Can't Contact,dc=example,dc=com
+changetype: add
+objectclass: referral
+objectclass: extensibleobject
+ou: Can't Contact
+# invalid URI to test broken connectivity handling (search only)
+ref: ${URI3}ou=Can't%20Contact,dc=example,dc=com
+EOMODS
+
+echo "Reading the referral entry \"ou=Can't Contact,$BASEDN\" as anonymous on port $PORT1..."
+$LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -S "" "(cn=Can't Contact)" \
+        > $SEARCHOUT 2>&1
+
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"