diff options
author | Damien Miller <djm@mindrot.org> | 2016-02-23 16:12:13 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-02-23 17:40:16 +1100 |
commit | 1acc058d0a7913838c830ed998a1a1fb5b7864bf (patch) | |
tree | 14ece3b75d64372c430198b0f36a8c0a124a585a /regress/keys-command.sh | |
parent | 39f303b1f36d934d8410b05625f25c7bcb75db4d (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/keys-command.sh')
-rw-r--r-- | regress/keys-command.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/regress/keys-command.sh b/regress/keys-command.sh index 700273b66..af68cf15c 100644 --- a/regress/keys-command.sh +++ b/regress/keys-command.sh | |||
@@ -36,6 +36,12 @@ exec cat "$OBJ/authorized_keys_${LOGNAME}" | |||
36 | _EOF | 36 | _EOF |
37 | $SUDO chmod 0755 "$KEY_COMMAND" | 37 | $SUDO chmod 0755 "$KEY_COMMAND" |
38 | 38 | ||
39 | if ! $OBJ/check-perm -m keys-command $KEY_COMMAND ; then | ||
40 | echo "skipping: $KEY_COMMAND is unsuitable as AuthorizedKeysCommand" | ||
41 | $SUDO rm -f $KEY_COMMAND | ||
42 | exit 0 | ||
43 | fi | ||
44 | |||
39 | if [ -x $KEY_COMMAND ]; then | 45 | if [ -x $KEY_COMMAND ]; then |
40 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak | 46 | cp $OBJ/sshd_proxy $OBJ/sshd_proxy.bak |
41 | 47 | ||