summaryrefslogtreecommitdiff
path: root/regress/sftp-chroot.sh
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-06-05 06:41:44 +0100
committerColin Watson <cjwatson@debian.org>2019-06-09 22:09:07 +0100
commit865a97e05b6aab1619e1c8eeb33ccb8f9a9e48d3 (patch)
tree7bb2128eb663180bacfabca88f26d26bf0733824 /regress/sftp-chroot.sh
parentba627ba172d6649919baedff5ba2789610da382a (diff)
parent7d50f9e5be88179325983a1f58c9d51bb58f025a (diff)
New upstream release (8.0p1)
Diffstat (limited to 'regress/sftp-chroot.sh')
-rw-r--r--regress/sftp-chroot.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/regress/sftp-chroot.sh b/regress/sftp-chroot.sh
index ba5bd1efb..5acc4d2de 100644
--- a/regress/sftp-chroot.sh
+++ b/regress/sftp-chroot.sh
@@ -1,11 +1,12 @@
1# $OpenBSD: sftp-chroot.sh,v 1.6 2018/02/09 03:42:57 dtucker Exp $ 1# $OpenBSD: sftp-chroot.sh,v 1.7 2018/11/22 08:48:32 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sftp in chroot" 4tid="sftp in chroot"
5 5
6CHROOT=/var/run 6CHROOT=/var/run
7FILENAME=testdata_${USER} 7FILENAME=testdata_${USER}.$$
8PRIVDATA=${CHROOT}/${FILENAME} 8PRIVDATA=${CHROOT}/${FILENAME}
9trap "${SUDO} rm -f ${PRIVDATA}" 0
9 10
10if [ -z "$SUDO" -a ! -w /var/run ]; then 11if [ -z "$SUDO" -a ! -w /var/run ]; then
11 echo "need SUDO to create file in /var/run, test won't work without" 12 echo "need SUDO to create file in /var/run, test won't work without"
@@ -28,5 +29,3 @@ ${SFTP} -S "$SSH" -F $OBJ/ssh_config host:/${FILENAME} $COPY \
28 >>$TEST_REGRESS_LOGFILE 2>&1 || \ 29 >>$TEST_REGRESS_LOGFILE 2>&1 || \
29 fatal "Fetch ${FILENAME} failed" 30 fatal "Fetch ${FILENAME} failed"
30cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" 31cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ"
31
32$SUDO rm $PRIVDATA