aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar divergentdave@5c17d06f6d67c6f157b76a4cc95ca764b7d2f899 <divergentdave@web>2016-02-01 06:52:55 +0000
committerGravatar admin <admin@branchable.com>2016-02-01 06:52:55 +0000
commite48cd9915662a221c57716d1a1225e79400d99d0 (patch)
tree49f731d14353a1d172259c5b31109b1e70a79be4 /doc
parent361c08cac70ca03d43e729d93daccdde1e1141b4 (diff)
Added a comment: Disabling SSH connection caching
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/Android_6.0_compatibility/comment_5_0bcee221dd22b424f08720604a486c79._comment29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/bugs/Android_6.0_compatibility/comment_5_0bcee221dd22b424f08720604a486c79._comment b/doc/bugs/Android_6.0_compatibility/comment_5_0bcee221dd22b424f08720604a486c79._comment
new file mode 100644
index 000000000..7ed65ea61
--- /dev/null
+++ b/doc/bugs/Android_6.0_compatibility/comment_5_0bcee221dd22b424f08720604a486c79._comment
@@ -0,0 +1,29 @@
+[[!comment format=mdwn
+ username="divergentdave@5c17d06f6d67c6f157b76a4cc95ca764b7d2f899"
+ nickname="divergentdave"
+ subject="Disabling SSH connection caching"
+ date="2016-02-01T06:52:55Z"
+ content="""
+I was looking into how SSH connection caching is handled, and it seems there's a bug in the sshCacheDir function in Annex/Ssh.hs. If I'm reading things right, `annex.sshcaching` is ignored when `annex.crippledfilesystem` is set. Thus, even though the configuration says SSH caching is disabled, this function still creates and passes out a temporary directory to be used for connection caching. Further up, this results in ControlPersist, ControlMaster, etc. being passed to OpenSSH, which runs into the SELinux rules. I think the `ifM` calls should be nested the other way around, (see below) which would allow me to turn off connection caching and hopefully get SSH working. I haven't tested this yet, though I plan to get a build environment set up within a month for further tinkering.
+
+Revised sshCacheDir:
+
+```
+sshCacheDir :: Annex (Maybe FilePath)
+sshCacheDir
+ | SysConfig.sshconnectioncaching = ifM
+ ( fromMaybe True . annexSshCaching <$> Annex.getGitConfig )
+ ( ifM crippledFileSystem
+ ( maybe (return Nothing) usetmpdir =<< gettmpdir
+ , Just <$> fromRepo gitAnnexSshDir )
+ , return Nothing
+ )
+ | otherwise = return Nothing
+ where
+ gettmpdir = liftIO $ getEnv \"GIT_ANNEX_TMP_DIR\"
+ usetmpdir tmpdir = liftIO $ catchMaybeIO $ do
+ let socktmp = tmpdir </> \"ssh\"
+ createDirectoryIfMissing True socktmp
+ return socktmp
+```
+"""]]