fix bugs in authorized_* file permission checking.
[monkeysphere.git] / src / monkeysphere
index dd689b5bfd45ca4b5dc6abbe97fe59b6096b7ac5..5703995f5edff3a21ca9e3de6bbea885c86be8c9 100755 (executable)
@@ -347,14 +347,10 @@ case $COMMAND in
        MODE='authorized_keys'
 
        # check permissions on the authorized_user_ids file path
-       if ! check_key_file_permissions "$USER" "$AUTHORIZED_USER_IDS" ; then
-           failure "Improper permissions on authorized_user_ids file path."
-       fi
+       check_key_file_permissions "$USER" "$AUTHORIZED_USER_IDS" || failure
 
        # check permissions on the authorized_keys file path
-       if ! check_key_file_permissions "$USER" "$AUTHORIZED_KEYS" ; then
-           failure "Improper permissions on authorized_keys file path."
-       fi
+       check_key_file_permissions "$USER" "$AUTHORIZED_KEYS" || failure
 
         # exit if the authorized_user_ids file is empty
        if [ ! -e "$AUTHORIZED_USER_IDS" ] ; then