[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-1013-g7709db4
Jeremy Allison
jra at samba.org
Tue Oct 6 18:20:08 MDT 2009
The branch, master has been updated
via 7709db4c0363fe2d7b061bbed5022a8fbbf78e7c (commit)
from 8dedceaff9543ce92d9ad51f67c5c51cd63e7931 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7709db4c0363fe2d7b061bbed5022a8fbbf78e7c
Author: Jeremy Allison <jra at samba.org>
Date: Tue Oct 6 17:18:15 2009 -0700
Test creating and deleting a bad symlink using the POSIX calls. Ensure
we don't regress on bug 6769.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/script/tests/test_smbclient_s3.sh | 42 +++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index f60c7d7..b0199a3 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -86,6 +86,44 @@ EOF
fi
}
+# Test creating a bad symlink and deleting it.
+test_bad_symlink()
+{
+ prompt="posix_unlink deleted file /newname"
+ tmpfile=/tmp/smbclient.in.$$
+
+ cat > $tmpfile <<EOF
+posix
+symlink badname newname
+posix_unlink newname
+quit
+EOF
+
+ cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT $CONFIGURATION "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
+ eval echo "$cmd"
+ out=`eval $cmd`
+ ret=$?
+ rm -f $tmpfile
+
+ if [ $ret != 0 ] ; then
+ echo "$out"
+ echo "failed create then delete bad symlink"
+ false
+ return
+ fi
+
+ echo "$out" | grep $prompt >/dev/null 2>&1
+
+ if [ $? = 0 ] ; then
+ # got the correct prompt .. succeed
+ true
+ else
+ echo failed create then delete bad symlink
+ false
+ fi
+}
+
+
testit "smbclient -L $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
testit "smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT $CONFIGURATION -L $SERVER -I $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
@@ -105,4 +143,8 @@ testit "interactive smbclient -l prompts on stdout" \
test_interactive_prompt_stdout -l /tmp || \
failed=`expr $failed + 1`
+testit "creating a bad symlink and deleting it" \
+ test_bad_symlink || \
+ failed=`expr $failed + 1`
+
testok $0 $failed
--
Samba Shared Repository
More information about the samba-cvs
mailing list