summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-28 22:32:56 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-28 22:32:56 -0400
commit4af6e62dee8d977ab52f16b61d38051175655082 (patch)
tree6f88a7b4bc7a62eda5633bf450b220532919a74b /src
parentdbbd331815b6f15f675d2ce651678b8b2ec06d68 (diff)
touch known_hosts file in monkeysphere so that permission checking
down't fail. remove spurios directory in monkeysphere.dirs. more work on test suite.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/monkeysphere8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index 5703995..7e800cc 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -318,10 +318,12 @@ case $COMMAND in
'update-known_hosts'|'update-known-hosts'|'k')
MODE='known_hosts'
+ # touch the known_hosts file so that the file permission check
+ # below won't fail upon not finding the file
+ (umask 0022 && touch "$KNOWN_HOSTS")
+
# check permissions on the known_hosts file path
- if ! check_key_file_permissions "$USER" "$KNOWN_HOSTS" ; then
- failure "Improper permissions on known_hosts file path."
- fi
+ check_key_file_permissions "$USER" "$KNOWN_HOSTS" || failure
# if hosts are specified on the command line, process just
# those hosts