diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-01 14:10:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-01 14:19:24 -0400 |
commit | 36d4d018420da4c515a8b6e4a8a7ba1caee0c6a7 (patch) | |
tree | f5906d4c0cda37136240232329e5e08a497b27c4 /Remote/GCrypt.hs | |
parent | 8cc8977ecce88853d2fa185e2372c412308b112f (diff) |
fix transferring to gcrypt repo from direct mode repo
recvkey was told it was receiving a HMAC key from a direct mode repo,
and that confused it into rejecting the transfer, since it has no way to
verify a key using that backend, since there is no HMAC backend.
I considered making recvkey skip verification in the case of an unknown
backend. However, that could lead to bad results; a key can legitimately be
in the annex with a backend that the remote git-annex-shell doesn't know
about. Better to keep it rejecting if it cannot verify.
Instead, made the gcrypt special remote not set the direct mode flag when
sending (and receiving) files.
Also, added some recvkey messages when its checks fail, since otherwise
all that is shown is a confusing error message from rsync when the remote
git-annex-shell exits nonzero.
Diffstat (limited to 'Remote/GCrypt.hs')
-rw-r--r-- | Remote/GCrypt.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs index b09943052..475a4785f 100644 --- a/Remote/GCrypt.hs +++ b/Remote/GCrypt.hs @@ -290,7 +290,7 @@ store r rsyncopts (cipher, enck) k p storeshell = withTmp enck $ \tmp -> ifM (spoolencrypted $ readBytes $ \b -> catchBoolIO $ L.writeFile tmp b >> return True) ( Ssh.rsyncHelper (Just p) - =<< Ssh.rsyncParamsRemote r Upload enck tmp Nothing + =<< Ssh.rsyncParamsRemote False r Upload enck tmp Nothing , return False ) spoolencrypted a = Annex.Content.sendAnnex k noop $ \src -> @@ -312,7 +312,7 @@ retrieve r rsyncopts (cipher, enck) k d p (readBytes $ meteredWriteFile meterupdate d) retrieversync = Remote.Rsync.retrieveEncrypted rsyncopts (cipher, enck) k d p retrieveshell = withTmp enck $ \tmp -> - ifM (Ssh.rsyncHelper (Just p) =<< Ssh.rsyncParamsRemote r Download enck tmp Nothing) + ifM (Ssh.rsyncHelper (Just p) =<< Ssh.rsyncParamsRemote False r Download enck tmp Nothing) ( liftIO $ catchBoolIO $ do decrypt cipher (feedFile tmp) $ readBytes $ L.writeFile d |