aboutsummaryrefslogtreecommitdiff
path: root/Remote/Rsync.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-11 14:06:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-11 14:07:56 -0400
commit066a06606aeb7f4a3cd70e7b592fef8dc6a9b71e (patch)
tree98458711a7dab3e3c669b513ed7b84cc2502374b /Remote/Rsync.hs
parentf779747a0d4d5c9e39a3c82498fe1809d56b4d25 (diff)
plumb creds from webapp to initremote
Avoids abusing setting environment variables, which was always a hack and won't work on windows.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r--Remote/Rsync.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index e27286d5a..b543387c3 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -42,6 +42,7 @@ import Utility.CopyFile
import Utility.Metered
import Annex.Perms
import Logs.Transfer
+import Types.Creds
type RsyncUrl = String
@@ -138,8 +139,8 @@ rsyncTransport gc rawurl
loginopt = maybe [] (\l -> ["-l",l]) login
fromNull as xs = if null xs then as else xs
-rsyncSetup :: Maybe UUID -> RemoteConfig -> Annex (RemoteConfig, UUID)
-rsyncSetup mu c = do
+rsyncSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
+rsyncSetup mu _ c = do
u <- maybe (liftIO genUUID) return mu
-- verify configuration is sane
let url = fromMaybe (error "Specify rsyncurl=") $