summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-04-20 16:56:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-04-20 16:56:01 -0400
commitf4d4f13c73a0fd0f9ebd1e63aaa956af7dd616bf (patch)
treec80eca0e5c5c8241feecaa82dc608f6ae54dfc76
parent63e61c13c1277141632628f267bb05902076e7cc (diff)
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.
-rw-r--r--Annex/Ssh.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 7ead526cb..159480121 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 = []