diff options
author | Andrew Cady <d@jerkface.net> | 2020-05-03 23:16:57 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-05-03 23:16:57 -0400 |
commit | 0ed32430c0c93f82ed62492e9a897cd0babece13 (patch) | |
tree | 1a7f5cfd9242226bf13902754600573a669843b4 /lib | |
parent | 85d7ca94153116c69e0a27a094092d3ac50f81b8 (diff) | |
parent | 27846f4db09c99fecdef972fe4a5fc41fd445500 (diff) |
Merge commit 'refs/namespaces/2d3c6f46d185bcac5a8bedd73102aa11cf797489/refs/heads/master' of cryptonomic.net:public_git/kiki
Diffstat (limited to 'lib')
-rw-r--r-- | lib/KeyRing.hs | 3 | ||||
-rw-r--r-- | lib/Kiki.hs | 3 |
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 | |||
51 | import qualified Data.ByteString.Char8 as S8 | 51 | import qualified Data.ByteString.Char8 as S8 |
52 | import Data.ByteArray.Encoding | 52 | import Data.ByteArray.Encoding |
53 | import qualified Codec.Compression.GZip as GZip | 53 | import qualified Codec.Compression.GZip as GZip |
54 | import GHC.Stack | ||
54 | import qualified System.Posix.Types as Posix | 55 | import qualified System.Posix.Types as Posix |
55 | import System.Posix.Files (setFileCreationMask, setFileTimes ) | 56 | import System.Posix.Files (setFileCreationMask, setFileTimes ) |
56 | import System.Posix.Files ( setFdTimesHiRes ) | 57 | import System.Posix.Files ( setFdTimesHiRes ) |
@@ -547,7 +548,7 @@ writeHostsFiles krd ctx (hostdbs0,hostdbs,u1,gpgnames,IPsToWriteToHostsFile outg | |||
547 | 548 | ||
548 | 549 | ||
549 | 550 | ||
550 | unconditionally :: IO (KikiCondition a) -> IO a | 551 | unconditionally :: HasCallStack => IO (KikiCondition a) -> IO a |
551 | unconditionally action = do | 552 | unconditionally 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 | |||
41 | import qualified Data.ByteString.Lazy as L | 41 | import qualified Data.ByteString.Lazy as L |
42 | import qualified Data.ByteString.Lazy.Char8 as Char8 | 42 | import qualified Data.ByteString.Lazy.Char8 as Char8 |
43 | import qualified Data.Map.Strict as Map | 43 | import qualified Data.Map.Strict as Map |
44 | import GHC.Stack | ||
44 | import Network.Socket | 45 | import Network.Socket |
45 | import qualified SSHKey as SSH | 46 | import 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 | ||
542 | rethrowKikiErrors :: KikiCondition a -> IO a | 543 | rethrowKikiErrors :: HasCallStack => KikiCondition a -> IO a |
543 | rethrowKikiErrors BadPassphrase = | 544 | rethrowKikiErrors 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.)" |
545 | rethrowKikiErrors rt = unconditionally $ return rt | 546 | rethrowKikiErrors rt = unconditionally $ return rt |