diff options
Diffstat (limited to 'Utility/SshConfig.hs')
-rw-r--r-- | Utility/SshConfig.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Utility/SshConfig.hs b/Utility/SshConfig.hs index d6cd32078..080f6479f 100644 --- a/Utility/SshConfig.hs +++ b/Utility/SshConfig.hs @@ -127,9 +127,13 @@ writeSshConfig f s = do {- Ensure that the ssh config file lacks any group or other write bits, - since ssh is paranoid about not working if other users can write - - to one of its config files (.ssh/config and .ssh/authorized_keys) -} + - to one of its config files (.ssh/config and .ssh/authorized_keys). + - + - If the chmod fails, ignore the failure, as it might be a filesystem like + - Android's that does not support file modes. + -} setSshConfigMode :: FilePath -> IO () -setSshConfigMode f = modifyFileMode f $ +setSshConfigMode f = void $ tryIO $ modifyFileMode f $ removeModes [groupWriteMode, otherWriteMode] sshDir :: IO FilePath |