summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-05-03 23:16:57 -0400
committerAndrew Cady <d@jerkface.net>2020-05-03 23:16:57 -0400
commit0ed32430c0c93f82ed62492e9a897cd0babece13 (patch)
tree1a7f5cfd9242226bf13902754600573a669843b4 /lib
parent85d7ca94153116c69e0a27a094092d3ac50f81b8 (diff)
parent27846f4db09c99fecdef972fe4a5fc41fd445500 (diff)
Merge commit 'refs/namespaces/2d3c6f46d185bcac5a8bedd73102aa11cf797489/refs/heads/master' of cryptonomic.net:public_git/kiki
Diffstat (limited to 'lib')
-rw-r--r--lib/KeyRing.hs3
-rw-r--r--lib/Kiki.hs3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 5f43b4f..07badb6 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -51,6 +51,7 @@ import qualified Data.ByteString as S
51import qualified Data.ByteString.Char8 as S8 51import qualified Data.ByteString.Char8 as S8
52import Data.ByteArray.Encoding 52import Data.ByteArray.Encoding
53import qualified Codec.Compression.GZip as GZip 53import qualified Codec.Compression.GZip as GZip
54import GHC.Stack
54import qualified System.Posix.Types as Posix 55import qualified System.Posix.Types as Posix
55import System.Posix.Files (setFileCreationMask, setFileTimes ) 56import System.Posix.Files (setFileCreationMask, setFileTimes )
56import System.Posix.Files ( setFdTimesHiRes ) 57import System.Posix.Files ( setFdTimesHiRes )
@@ -547,7 +548,7 @@ writeHostsFiles krd ctx (hostdbs0,hostdbs,u1,gpgnames,IPsToWriteToHostsFile outg
547 548
548 549
549 550
550unconditionally :: IO (KikiCondition a) -> IO a 551unconditionally :: HasCallStack => IO (KikiCondition a) -> IO a
551unconditionally action = do 552unconditionally action = do
552 r <- action 553 r <- action
553 case r of 554 case r of
diff --git a/lib/Kiki.hs b/lib/Kiki.hs
index ddcaba0..02ac397 100644
--- a/lib/Kiki.hs
+++ b/lib/Kiki.hs
@@ -41,6 +41,7 @@ import qualified Data.ByteString.Char8 as S8
41import qualified Data.ByteString.Lazy as L 41import qualified Data.ByteString.Lazy as L
42import qualified Data.ByteString.Lazy.Char8 as Char8 42import qualified Data.ByteString.Lazy.Char8 as Char8
43import qualified Data.Map.Strict as Map 43import qualified Data.Map.Strict as Map
44import GHC.Stack
44import Network.Socket 45import Network.Socket
45import qualified SSHKey as SSH 46import qualified SSHKey as SSH
46 47
@@ -539,7 +540,7 @@ refreshCache rt rootdir = do
539 rt'' <- rethrowKikiErrors rt' 540 rt'' <- rethrowKikiErrors rt'
540 writePublicKeyFiles rt'' fw myId 541 writePublicKeyFiles rt'' fw myId
541 542
542rethrowKikiErrors :: KikiCondition a -> IO a 543rethrowKikiErrors :: HasCallStack => KikiCondition a -> IO a
543rethrowKikiErrors BadPassphrase = 544rethrowKikiErrors BadPassphrase =
544 error "Operation requires correct passphrase. (Hint: Use --passphrase-fd=0 to input it on stdin.)" 545 error "Operation requires correct passphrase. (Hint: Use --passphrase-fd=0 to input it on stdin.)"
545rethrowKikiErrors rt = unconditionally $ return rt 546rethrowKikiErrors rt = unconditionally $ return rt