summaryrefslogtreecommitdiff
path: root/Assistant/Threads
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-11 00:23:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-11 00:23:34 -0400
commit675621d903aeb9928955483a58c2e5d463d31a35 (patch)
treec92389ed139c6a1cd44e1a54089f68e4ec4dfbb0 /Assistant/Threads
parente588383e09259ddb06a661ce73a583b6e7257ce6 (diff)
clean up authorized_keys handling
Including rollback of adding the key when a pairing response gets canceled by the user.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r--Assistant/Threads/PairListener.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/PairListener.hs b/Assistant/Threads/PairListener.hs
index e0ed1217a..5cf20fa70 100644
--- a/Assistant/Threads/PairListener.hs
+++ b/Assistant/Threads/PairListener.hs
@@ -94,7 +94,7 @@ pairReqReceived False dstatus urlrenderer msg = do
{- When a verified PairAck is seen, a host is ready to pair with us, and has
- already configured our ssh key. Stop sending PairReqs, finish the pairing,
- - and send a few PairDones.
+ - and send a single PairDone.
-
- TODO: A stale PairAck might also be seen, after we've finished pairing.
- Perhaps our PairDone was not received. To handle this, we keep
@@ -106,9 +106,10 @@ pairAckReceived False _ _ _ _ _ = noop -- not verified
pairAckReceived True Nothing _ _ _ _ = noop -- not in progress
pairAckReceived True (Just pip) st dstatus scanremotes msg = do
stopSending dstatus pip
+ setupAuthorizedKeys msg
finishedPairing st dstatus scanremotes msg (inProgressSshKeyPair pip)
startSending dstatus pip $ multicastPairMsg
- (Just 10) (inProgressSecret pip) PairDone (inProgressPairData pip)
+ (Just 1) (inProgressSecret pip) PairDone (inProgressPairData pip)
{- If we get a verified PairDone, the host has accepted our PairAck, and
- has paired with us. Stop sending PairAcks, and finish pairing with them.