From 2807e1490493b98746b9e445b0fce2ede54b674a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 20 Apr 2014 16:56:01 -0400 Subject: [PATCH] use a subdir of GIT_ANNEX_TMP for ssh connection caching sockets To prevent any possible collisions with other, non-socket files, like the xmppgit directory. --- Annex/Ssh.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 7ead526cbc..1594801217 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -103,8 +103,9 @@ sshCacheDir where gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR" usetmpdir tmpdir = liftIO $ catchMaybeIO $ do - createDirectoryIfMissing True tmpdir - return tmpdir + let socktmp = tmpdir "ssh" + createDirectoryIfMissing True socktmp + return socktmp portParams :: Maybe Integer -> [CommandParam] portParams Nothing = []