]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test009-referral
ITS#5086
[openldap] / tests / scripts / test009-referral
index 40118f8fcc3903a8e34ec7bbd9c0601f1841813b..9be1b53f85b4c3d002a902b57128fabcf8d7d70a 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-2007 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -145,6 +145,18 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+echo "Testing dontUseCopy control..."
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
+       -E \!dontUseCopy \
+       'sn=jensen' >> $SEARCHOUT
+RC=$?
+if test $RC = 10 ; then
+       echo "ldapsearch failed as expected ($RC)"
+else
+       echo "ldapsearch did not error as expected ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS