X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere;h=7e800cc4d61942f53deff20817f08633da6a8a74;hb=4af6e62dee8d977ab52f16b61d38051175655082;hp=5703995f5edff3a21ca9e3de6bbea885c86be8c9;hpb=dbbd331815b6f15f675d2ce651678b8b2ec06d68;p=monkeysphere.git 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