summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-04-29 13:02:09 -0400
committerjoe <joe@jerkface.net>2016-04-29 13:02:09 -0400
commitbc624dbf7d08732d6c35ef7f33b366e7821ff906 (patch)
treeed4783f398b9215f8d872872f8fc46300b629d18
parent889aadea2d5cf18cd96ef07e6f76fd0a54fc1e67 (diff)
Set appropriate umask for .gnupg creation.
-rw-r--r--lib/Kiki.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Kiki.hs b/lib/Kiki.hs
index 38064ff..bdf8932 100644
--- a/lib/Kiki.hs
+++ b/lib/Kiki.hs
@@ -117,6 +117,7 @@ importAndRefresh root cmn = do
117 (home,secring,pubring,mbwk) <- unconditionally $ getHomeDir homespec 117 (home,secring,pubring,mbwk) <- unconditionally $ getHomeDir homespec
118 osHomeDir <- if bUnprivileged then getHomeDirectory else return "/root" 118 osHomeDir <- if bUnprivileged then getHomeDirectory else return "/root"
119 119
120 old_umask <- setFileCreationMask(0o077);
120 -- Generate secring.gpg if it does not exist... 121 -- Generate secring.gpg if it does not exist...
121 gotsec <- doesFileExist secring 122 gotsec <- doesFileExist secring
122 when (not gotsec) $ do 123 when (not gotsec) $ do
@@ -145,6 +146,7 @@ importAndRefresh root cmn = do
145 HomePub 146 HomePub
146 ( encode $ Message [] ) 147 ( encode $ Message [] )
147 148
149 setFileCreationMask(old_umask);
148 -- Old paths.. 150 -- Old paths..
149 -- 151 --
150 -- Private 152 -- Private