]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "s3: smbclient: Test we can rename with a name containing." 109/head
authorKarolin Seeger <kseeger@samba.org>
Thu, 2 Nov 2017 12:00:14 +0000 (13:00 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 2 Nov 2017 15:56:03 +0000 (16:56 +0100)
This reverts commit 8c7d944f106ca54581f5757bb8fa9c85169a04f2.

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Thu Nov  2 16:56:03 CET 2017 on sn-devel-144

source3/script/tests/test_smbclient_s3.sh

index fe1c7ba8f6708ea8022cc02cbe8b5cdeab56a337..ce1cb089ea9e1247d9a1693ed70daa486bc580e6 100755 (executable)
@@ -1277,50 +1277,6 @@ done
 
 LOGDIR=$(mktemp -d ${PREFIX}/${LOGDIR_PREFIX}_XXXXXX)
 
-# Test smbclient renames with pathnames containing '..'
-test_rename_dotdot()
-{
-    tmpfile=$PREFIX/smbclient_interactive_prompt_commands
-
-cat > $tmpfile <<EOF
-deltree dotdot_test
-mkdir dotdot_test
-cd dotdot_test
-mkdir dir1
-mkdir dir2
-cd dir1
-put ${SMBCLIENT} README
-rename README ..\\dir2\\README
-cd ..
-cd dir2
-allinfo README
-cd \\
-deltree dotdot_test
-quit
-EOF
-    cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
-    eval echo "$cmd"
-    out=`eval $cmd`
-    ret=$?
-
-    if [ $ret != 0 ] ; then
-       echo "$out"
-       echo "failed rename_dotdot test with output $ret"
-       false
-       return
-    fi
-
-    # We are allowed to get NT_STATUS_NO_SUCH_FILE listing \dotdot_test
-    # as the top level directory should not exist, but no other errors.
-
-    error_str=`echo $out | grep NT_STATUS | grep -v "NT_STATUS_NO_SUCH_FILE listing .dotdot_test"`
-    if [ "$error_str" != "" ]; then
-        echo "failed - unexpected NT_STATUS error in $out"
-        false
-        return
-    fi
-}
-
 
 testit "smbclient -L $SERVER_IP" $SMBCLIENT -L $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
 testit "smbclient -L $SERVER -I $SERVER_IP" $SMBCLIENT -L $SERVER -I $SERVER_IP -N -p 139 -c quit || failed=`expr $failed + 1`
@@ -1417,10 +1373,6 @@ testit "follow local symlinks" \
     test_local_symlinks || \
     failed=`expr $failed + 1`
 
-testit "rename_dotdot" \
-    test_rename_dotdot || \
-    failed=`expr $failed + 1`
-
 testit "rm -rf $LOGDIR" \
     rm -rf $LOGDIR || \
     failed=`expr $failed + 1`