From 2e7a44d1e4fa348849bc821ced6d04ace4006d3c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 24 Jul 2009 17:16:42 -0400 Subject: [PATCH] started preparing tests to work under loosely-permissioned temporary directories. --- tests/basic | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/tests/basic b/tests/basic index 83bf753..6eb0b27 100755 --- a/tests/basic +++ b/tests/basic @@ -2,7 +2,8 @@ # Tests to ensure that the monkeysphere is working # -# unset MONKEYSPHERE_TEST_NO_EXAMINE to examine +# unset MONKEYSPHERE_TEST_NO_EXAMINE to get a prompt to examine the +# test state after failure. # Authors: # Daniel Kahn Gillmor @@ -145,6 +146,35 @@ export SOCKET="$TEMPDIR"/ssh-socket export DISPLAY=monkeys +## we cannot do proper directory permissions checking if the current +## working directory has unsatisfactory permissions: +if ( . "$MONKEYSPHERE_SYSSHAREDIR"/common && check_key_file_permissions $(whoami) "$TEMPDIR" ) ; then + echo "Permissions on temporary directory '$TEMPDIR' are OK for permissions checks." + TEMPDIR_PERMISSIONS_SAFE=yes +else + cat <> "$SSHD_CONFIG" +StrictModes no +EOF +fi + ###################################################################### ### SERVER HOST SETUP -- 2.26.2