summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utility/SshConfig.hs8
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/Android:_Adding_Repository_on_Remote_Server_fails_with___34__Internal_Server_Error__34__.mdwn3
3 files changed, 11 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
diff --git a/debian/changelog b/debian/changelog
index 845507b24..a805e234e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/doc/bugs/Android:_Adding_Repository_on_Remote_Server_fails_with___34__Internal_Server_Error__34__.mdwn b/doc/bugs/Android:_Adding_Repository_on_Remote_Server_fails_with___34__Internal_Server_Error__34__.mdwn
index 79f1e270d..ed0eb1469 100644
--- a/doc/bugs/Android:_Adding_Repository_on_Remote_Server_fails_with___34__Internal_Server_Error__34__.mdwn
+++ b/doc/bugs/Android:_Adding_Repository_on_Remote_Server_fails_with___34__Internal_Server_Error__34__.mdwn
@@ -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]]