summaryrefslogtreecommitdiff
path: root/regress/sftp-chroot.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2016-02-23 16:12:13 +1100
committerDamien Miller <djm@mindrot.org>2016-02-23 17:40:16 +1100
commit1acc058d0a7913838c830ed998a1a1fb5b7864bf (patch)
tree14ece3b75d64372c430198b0f36a8c0a124a585a /regress/sftp-chroot.sh
parent39f303b1f36d934d8410b05625f25c7bcb75db4d (diff)
Disable tests where fs perms are incorrect
Some tests have strict requirements on the filesystem permissions for certain files and directories. This adds a regress/check-perm tool that copies the relevant logic from sshd to exactly test the paths in question. This lets us skip tests when the local filesystem doesn't conform to our expectations rather than continuing and failing the test run. ok dtucker@
Diffstat (limited to 'regress/sftp-chroot.sh')
-rw-r--r--regress/sftp-chroot.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/regress/sftp-chroot.sh b/regress/sftp-chroot.sh
index 23f7456e8..9c26eb680 100644
--- a/regress/sftp-chroot.sh
+++ b/regress/sftp-chroot.sh
@@ -12,6 +12,11 @@ if [ -z "$SUDO" ]; then
12 exit 0 12 exit 0
13fi 13fi
14 14
15if ! $OBJ/check-perm -m chroot "$CHROOT" ; then
16 echo "skipped: $CHROOT is unsuitable as ChrootDirectory"
17 exit 0
18fi
19
15$SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \ 20$SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \
16 fatal "create $PRIVDATA failed" 21 fatal "create $PRIVDATA failed"
17 22