summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-09-05 17:23:24 -0400
committerjoe <joe@jerkface.net>2016-09-05 17:23:24 -0400
commit705fdf0fa6121bc511497a69021c000e06638c6c (patch)
treed5eabedfdab35c5f71a3c4ad0d18ed4689dd7f09
parent0214686d1beaf10bd0b03b36105f59311111b3df (diff)
i386 haddock doesn't like my unicode.
amd64 liked it fine. Go figure.
-rw-r--r--cokiki.hs10
-rw-r--r--kiki.hs2
-rw-r--r--lib/Kiki.hs12
3 files changed, 12 insertions, 12 deletions
diff --git a/cokiki.hs b/cokiki.hs
index b6d94a0..a685977 100644
--- a/cokiki.hs
+++ b/cokiki.hs
@@ -63,11 +63,11 @@ main = do
63 (cmd,args) <- splitAt 1 <$> getArgs 63 (cmd,args) <- splitAt 1 <$> getArgs
64 uid <- getEffectiveUserID 64 uid <- getEffectiveUserID
65 let msel = case cmd of 65 let msel = case cmd of
66 ["ssh-client"] -> Just $ sshClient uid <$> Kiki.chroot <*> Kiki.homedir 66 ["ssh-client"] -> Just $ sshClient uid <$> Kiki.opt_chroot <*> Kiki.opt_homedir
67 ["ssh-server"] -> Just $ sshServer uid <$> Kiki.chroot <*> Kiki.homedir 67 ["ssh-server"] -> Just $ sshServer uid <$> Kiki.opt_chroot <*> Kiki.opt_homedir
68 ["strongswan"] -> Just $ strongswan uid <$> Kiki.chroot <*> Kiki.homedir 68 ["strongswan"] -> Just $ strongswan uid <$> Kiki.opt_chroot <*> Kiki.opt_homedir
69 ["tor"] -> Just $ configureTor uid <$> Kiki.chroot <*> Kiki.homedir 69 ["tor"] -> Just $ configureTor uid <$> Kiki.opt_chroot <*> Kiki.opt_homedir
70 ["hosts"] -> Just $ configureHosts uid <$> Kiki.chroot <*> Kiki.homedir 70 ["hosts"] -> Just $ configureHosts uid <$> Kiki.opt_chroot <*> Kiki.opt_homedir
71 _ -> Nothing 71 _ -> Nothing
72 spec = uncurry fancy Kiki.kikiOptions "" 72 spec = uncurry fancy Kiki.kikiOptions ""
73 errorQuit msg = do 73 errorQuit msg = do
diff --git a/kiki.hs b/kiki.hs
index adb7973..e8b6753 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1548,7 +1548,7 @@ kiki "init" args | "--help" `elem` args = do
1548 , "" 1548 , ""
1549 ] ++ documentHomeDir ++ [""] ++ documentPassphraseFDFlag True True True 1549 ] ++ documentHomeDir ++ [""] ++ documentPassphraseFDFlag True True True
1550 1550
1551kiki "init" args = run args $ importAndRefresh <$> chroot <*> homedir <*> cipher 1551kiki "init" args = run args $ importAndRefresh <$> opt_chroot <*> opt_homedir <*> opt_cipher
1552 1552
1553kiki "delete" args | "--help" `elem` args = do 1553kiki "delete" args | "--help" `elem` args = do
1554 putStr . unlines $ 1554 putStr . unlines $
diff --git a/lib/Kiki.hs b/lib/Kiki.hs
index 45e67f8..a683a91 100644
--- a/lib/Kiki.hs
+++ b/lib/Kiki.hs
@@ -656,16 +656,16 @@ slash "" ('/':xs) = '/':xs
656slash "" xs = '/':xs 656slash "" xs = '/':xs
657slash (y:ys) xs = y:slash ys xs 657slash (y:ys) xs = y:slash ys xs
658 658
659chroot :: Args (FilePath -> FilePath) 659opt_chroot :: Args (FilePath -> FilePath)
660chroot = pure (\r a -> slash r a) <*> arg "--chroot" <|> pure id 660opt_chroot = pure (\r a -> slash r a) <*> arg "--chroot" <|> pure id
661 661
662homedir :: Args CommonArgsParsed 662opt_homedir :: Args CommonArgsParsed
663homedir = CommonArgsParsed 663opt_homedir = CommonArgsParsed
664 <$> optional (arg "--homedir") 664 <$> optional (arg "--homedir")
665 <*> optional (FileDesc <$> read <$> arg "--passphrase-fd") 665 <*> optional (FileDesc <$> read <$> arg "--passphrase-fd")
666 666
667cipher :: Args SymmetricAlgorithm 667opt_cipher :: Args SymmetricAlgorithm
668cipher = fromMaybe CAST5 <$> optional (cipherFromString <$> arg "--cipher") 668opt_cipher = fromMaybe CAST5 <$> optional (cipherFromString <$> arg "--cipher")
669 669
670kikiOptions :: ( [(String,Int)], [String] ) 670kikiOptions :: ( [(String,Int)], [String] )
671kikiOptions = ( ss, ps ) 671kikiOptions = ( ss, ps )