summaryrefslogtreecommitdiff
path: root/regress/sftp-badcmds.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-10-07 10:43:57 +1100
committerDarren Tucker <dtucker@zip.com.au>2009-10-07 10:43:57 +1100
commited6b0c5fc21807ff771a499fd042a24f963f7291 (patch)
tree872b22ff1070a261ce0e9b036100466609c1da56 /regress/sftp-badcmds.sh
parent287b9329c5fc2e1a177f9608209a35a6c5bf852a (diff)
- djm@cvs.openbsd.org 2009/08/13 01:11:55
[sftp-batch.sh sftp-badcmds.sh sftp.sh sftp-cmds.sh sftp-glob.sh] date: 2009/08/13 01:11:19; author: djm; state: Exp; lines: +10 -7 Swizzle options: "-P sftp_server_path" moves to "-D sftp_server_path", add "-P port" to match scp(1). Fortunately, the -P option is only really used by our regression scripts. part of larger patch from carlosvsilvapt@gmail.com for his Google Summer of Code work; ok deraadt markus
Diffstat (limited to 'regress/sftp-badcmds.sh')
-rw-r--r--regress/sftp-badcmds.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/regress/sftp-badcmds.sh b/regress/sftp-badcmds.sh
index b48b1cb01..08009f26b 100644
--- a/regress/sftp-badcmds.sh
+++ b/regress/sftp-badcmds.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: sftp-badcmds.sh,v 1.3 2008/03/24 21:46:54 djm Exp $ 1# $OpenBSD: sftp-badcmds.sh,v 1.4 2009/08/13 01:11:55 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sftp invalid commands" 4tid="sftp invalid commands"
@@ -13,13 +13,13 @@ rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd
13 13
14rm -f ${COPY} 14rm -f ${COPY}
15verbose "$tid: get nonexistent" 15verbose "$tid: get nonexistent"
16echo "get $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 16echo "get $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
17 || fail "get nonexistent failed" 17 || fail "get nonexistent failed"
18test -f ${COPY} && fail "existing copy after get nonexistent" 18test -f ${COPY} && fail "existing copy after get nonexistent"
19 19
20rm -f ${COPY}.dd/* 20rm -f ${COPY}.dd/*
21verbose "$tid: glob get to nonexistent directory" 21verbose "$tid: glob get to nonexistent directory"
22echo "get /bin/l* $NONEXIST" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 22echo "get /bin/l* $NONEXIST" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
23 || fail "get nonexistent failed" 23 || fail "get nonexistent failed"
24for x in $GLOBFILES; do 24for x in $GLOBFILES; do
25 test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent" 25 test -f ${COPY}.dd/$x && fail "existing copy after get nonexistent"
@@ -27,13 +27,13 @@ done
27 27
28rm -f ${COPY} 28rm -f ${COPY}
29verbose "$tid: put nonexistent" 29verbose "$tid: put nonexistent"
30echo "put $NONEXIST $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 30echo "put $NONEXIST $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
31 || fail "put nonexistent failed" 31 || fail "put nonexistent failed"
32test -f ${COPY} && fail "existing copy after put nonexistent" 32test -f ${COPY} && fail "existing copy after put nonexistent"
33 33
34rm -f ${COPY}.dd/* 34rm -f ${COPY}.dd/*
35verbose "$tid: glob put to nonexistent directory" 35verbose "$tid: glob put to nonexistent directory"
36echo "put /bin/l* ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 36echo "put /bin/l* ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
37 || fail "put nonexistent failed" 37 || fail "put nonexistent failed"
38for x in $GLOBFILES; do 38for x in $GLOBFILES; do
39 test -f ${COPY}.dd/$x && fail "existing copy after nonexistent" 39 test -f ${COPY}.dd/$x && fail "existing copy after nonexistent"
@@ -41,7 +41,7 @@ done
41 41
42rm -f ${COPY} 42rm -f ${COPY}
43verbose "$tid: rename nonexistent" 43verbose "$tid: rename nonexistent"
44echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 44echo "rename $NONEXIST ${COPY}.1" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
45 || fail "rename nonexist failed" 45 || fail "rename nonexist failed"
46test -f ${COPY}.1 && fail "file exists after rename nonexistent" 46test -f ${COPY}.1 && fail "file exists after rename nonexistent"
47 47
@@ -49,7 +49,7 @@ rm -rf ${COPY} ${COPY}.dd
49cp $DATA $COPY 49cp $DATA $COPY
50mkdir ${COPY}.dd 50mkdir ${COPY}.dd
51verbose "$tid: rename target exists (directory)" 51verbose "$tid: rename target exists (directory)"
52echo "rename $COPY ${COPY}.dd" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 \ 52echo "rename $COPY ${COPY}.dd" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \
53 || fail "rename target exists (directory) failed" 53 || fail "rename target exists (directory) failed"
54test -f ${COPY} || fail "oldname missing after rename target exists (directory)" 54test -f ${COPY} || fail "oldname missing after rename target exists (directory)"
55test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)" 55test -d ${COPY}.dd || fail "newname missing after rename target exists (directory)"
@@ -59,7 +59,7 @@ rm -f ${COPY}.dd/*
59rm -rf ${COPY} 59rm -rf ${COPY}
60cp ${DATA2} ${COPY} 60cp ${DATA2} ${COPY}
61verbose "$tid: glob put files to local file" 61verbose "$tid: glob put files to local file"
62echo "put /bin/l* $COPY" | ${SFTP} -P ${SFTPSERVER} >/dev/null 2>&1 62echo "put /bin/l* $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1
63cmp ${DATA2} ${COPY} || fail "put successed when it should have failed" 63cmp ${DATA2} ${COPY} || fail "put successed when it should have failed"
64 64
65rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd 65rm -rf ${COPY} ${COPY}.1 ${COPY}.2 ${COPY}.dd