Android: Avoid crashing when unable to set file mode for ssh config file due to Android filesystem horribleness.

This commit is contained in:
Joey Hess 2014-02-07 14:57:23 -04:00
parent 590adeb2a7
commit 3cbaa68be8
3 changed files with 11 additions and 2 deletions

View file

@ -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

2
debian/changelog vendored
View file

@ -31,6 +31,8 @@ git-annex (5.20140128) UNRELEASED; urgency=medium
* Windows: Fix bug in symlink calculation code.
* Fix initremote with encryption=pubkey to work with S3, glacier, webdav,
and external special remotes.
* Android: Avoid crashing when unable to set file mode for ssh config file
due to Android filesystem horribleness.
-- Joey Hess <joeyh@debian.org> Tue, 28 Jan 2014 13:57:19 -0400

View file

@ -15,3 +15,6 @@ Add a repository on a remote server to an existing repository. After selecting "
git-annex version 5.20140116-g2d9ec29
Android version 4.4 (running on a Nexus 5)
> I have made this failure to set the file mode not be a fatal error.
> [[fixed|done]] --[[Joey]]