From 1acc058d0a7913838c830ed998a1a1fb5b7864bf Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 23 Feb 2016 16:12:13 +1100 Subject: 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@ --- regress/sftp-chroot.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'regress/sftp-chroot.sh') 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 exit 0 fi +if ! $OBJ/check-perm -m chroot "$CHROOT" ; then + echo "skipped: $CHROOT is unsuitable as ChrootDirectory" + exit 0 +fi + $SUDO sh -c "echo mekmitastdigoat > $PRIVDATA" || \ fatal "create $PRIVDATA failed" -- cgit v1.2.3