summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-03-27 22:07:50 -0700
committerKarolin Seeger <kseeger@samba.org>2017-03-31 08:18:29 +0200
commited50b9f43a7b1e91f63022e0ce370c0eb322d052 (patch)
treeac60f53a025e7ac635849d30fa966a9a386790f1
parent75df72a0b6076c40ce568475f3253ccbdc5ebd2d (diff)
downloadsamba-ed50b9f43a7b1e91f63022e0ce370c0eb322d052.tar.gz
s3: Fixup test for CVE-2017-2619 regression with "follow symlinks = no"
Use correct bash operators (not string operators). Add missing "return". BUG: https://bugzilla.samba.org/show_bug.cgi?id=12721 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 037297a1c50e90a0092e3b94f472623f41ccc015)
-rwxr-xr-xsource3/script/tests/test_smbclient_s3.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index f13fd348fe5..bf55d0207d6 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -1098,7 +1098,7 @@ EOF
ret=$?
rm -f $tmpfile
- if [ $ret != 0 ] ; then
+ if [ $ret -ne 0 ] ; then
echo "$out"
echo "failed accessing nosymlinks with error $ret"
false
@@ -1107,10 +1107,11 @@ EOF
echo "$out" | grep 'NT_STATUS_ACCESS_DENIED'
ret=$?
- if [ $ret != 0 ] ; then
+ if [ $ret -ne 0 ] ; then
echo "$out"
echo "failed - should get NT_STATUS_ACCESS_DENIED getting \\nosymlinks\\source"
false
+ return
fi
# But we should be able to create and delete directories.
@@ -1125,7 +1126,7 @@ EOF
ret=$?
rm -f $tmpfile
- if [ $ret != 0 ] ; then
+ if [ $ret -ne 0 ] ; then
echo "$out"
echo "failed accessing nosymlinks with error $ret"
false
@@ -1134,7 +1135,7 @@ EOF
echo "$out" | grep 'NT_STATUS'
ret=$?
- if [ $ret == 0 ] ; then
+ if [ $ret -eq 0 ] ; then
echo "$out"
echo "failed - NT_STATUS_XXXX doing mkdir a; mkdir a\\b on \\nosymlinks"
false