diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-02 15:05:12 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-02 15:10:50 -0400 |
commit | 75692a31ecaa1b23429af912fad93762c2e5840e (patch) | |
tree | ac9187db8ef4592b05cbbb3e15ff98984dfd2604 | |
parent | f758bce3d358300fde3a5b0cac9677cb4aaa9754 (diff) |
assistant: Fix ANNEX_SHELL_DIR written to ~/.ssh/authorized_keys in local pairing to be the absolute path to the repository, not "."
This was a reversion caused by the relative path changes in 5.20150113.
Other uses of addAuthorizedKeys seem to be ok. If the user enters a
directory like ~/annex, it writes GIT_ANNEX_SHELL_DIRECTORY=annex, and
git-annex-shell assumes that's relative to HOME.
-rw-r--r-- | Assistant/Pairing/MakeRemote.hs | 5 | ||||
-rw-r--r-- | debian/changelog | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Assistant/Pairing/MakeRemote.hs b/Assistant/Pairing/MakeRemote.hs index e2e120e22..75a266fa2 100644 --- a/Assistant/Pairing/MakeRemote.hs +++ b/Assistant/Pairing/MakeRemote.hs @@ -25,8 +25,9 @@ import qualified Data.Text as T setupAuthorizedKeys :: PairMsg -> FilePath -> IO () setupAuthorizedKeys msg repodir = case validateSshPubKey $ remoteSshPubKey $ pairMsgData msg of Left err -> error err - Right pubkey -> - unlessM (liftIO $ addAuthorizedKeys True repodir pubkey) $ + Right pubkey -> do + absdir <- absPath repodir + unlessM (liftIO $ addAuthorizedKeys True absdir pubkey) $ error "failed setting up ssh authorized keys" {- When local pairing is complete, this is used to set up the remote for diff --git a/debian/changelog b/debian/changelog index fc8b39716..608a84d3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ git-annex (5.20150618) UNRELEASED; urgency=medium use the ssh agent of a new login session. * assistant: Fix local pairing to not include newline in ssh pubkey, which is rejected on the other end for security reasons. + * assistant: Fix ANNEX_SHELL_DIR written to ~/.ssh/authorized_keys + in local pairing to be the absolute path to the repository, not "." + This was a reversion caused by the relative path changes in 5.20150113. -- Joey Hess <id@joeyh.name> Thu, 02 Jul 2015 12:31:14 -0400 |