webapp: When setting up authorized_keys, use GIT_ANNEX_SHELL_DIRECTORY.

This commit is contained in:
Joey Hess 2012-11-05 12:21:13 -04:00
parent bd230efa56
commit 0b8027e527
6 changed files with 26 additions and 21 deletions

View file

@ -18,10 +18,10 @@ import qualified Data.Text as T
{- Authorized keys are set up before pairing is complete, so that the other
- side can immediately begin syncing. -}
setupAuthorizedKeys :: PairMsg -> IO ()
setupAuthorizedKeys msg = do
setupAuthorizedKeys :: PairMsg -> FilePath -> IO ()
setupAuthorizedKeys msg repodir = do
validateSshPubKey pubkey
unlessM (liftIO $ addAuthorizedKeys False pubkey) $
unlessM (liftIO $ addAuthorizedKeys False repodir pubkey) $
error "failed setting up ssh authorized keys"
where
pubkey = remoteSshPubKey $ pairMsgData msg