diff options
author | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
commit | 102062f825fb26a74295a1c089c00c4c4c76b68a (patch) | |
tree | 3db66bc8c8483cce66516dff36f6ef56065143d9 /regress/sftp-chroot.sh | |
parent | 3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff) | |
parent | fd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff) |
Import openssh_8.0p1.orig.tar.gz
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 | ||