diff options
author | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-09 22:09:07 +0100 |
commit | 865a97e05b6aab1619e1c8eeb33ccb8f9a9e48d3 (patch) | |
tree | 7bb2128eb663180bacfabca88f26d26bf0733824 /regress/sftp-chroot.sh | |
parent | ba627ba172d6649919baedff5ba2789610da382a (diff) | |
parent | 7d50f9e5be88179325983a1f58c9d51bb58f025a (diff) |
New upstream release (8.0p1)
Diffstat (limited to 'regress/sftp-chroot.sh')
-rw-r--r-- | regress/sftp-chroot.sh | 7 |
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 | ||
4 | tid="sftp in chroot" | 4 | tid="sftp in chroot" |
5 | 5 | ||
6 | CHROOT=/var/run | 6 | CHROOT=/var/run |
7 | FILENAME=testdata_${USER} | 7 | FILENAME=testdata_${USER}.$$ |
8 | PRIVDATA=${CHROOT}/${FILENAME} | 8 | PRIVDATA=${CHROOT}/${FILENAME} |
9 | trap "${SUDO} rm -f ${PRIVDATA}" 0 | ||
9 | 10 | ||
10 | if [ -z "$SUDO" -a ! -w /var/run ]; then | 11 | if [ -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" |
30 | cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" | 31 | cmp $PRIVDATA $COPY || fail "$PRIVDATA $COPY differ" |
31 | |||
32 | $SUDO rm $PRIVDATA | ||