diff options
| author | Joey Hess <joeyh@joeyh.name> | 2018-02-01 12:27:26 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2018-02-01 12:27:26 -0400 |
| commit | e80ac83657169b973fd8fe25deb42f458da475b9 (patch) | |
| tree | 885f8e981c9ff941ab959cdcc804a90c53c38509 /src/Propellor/Property/Gpg.hs | |
| parent | 81d288629d82e1fa81bb004a74ef9480b3a544a0 (diff) | |
| parent | 5cd0291025b92ee2e408abd73b2cb4225f22465d (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Gpg.hs')
| -rw-r--r-- | src/Propellor/Property/Gpg.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/Gpg.hs b/src/Propellor/Property/Gpg.hs index 27baa4ba..ac057b2e 100644 --- a/src/Propellor/Property/Gpg.hs +++ b/src/Propellor/Property/Gpg.hs @@ -33,7 +33,7 @@ keyImported key@(GpgKeyId keyid) user@(User u) = prop ifM (liftIO $ hasGpgKey (parse keylines)) ( return NoChange , makeChange $ withHandle StdinHandle createProcessSuccess - (proc "su" ["-c", "gpg --import", u]) $ \h -> do + (proc "su" ["--login", "-c", "gpg --import", u]) $ \h -> do hPutStr h (unlines keylines) hClose h ) @@ -49,11 +49,11 @@ keyImported key@(GpgKeyId keyid) user@(User u) = prop hasPrivKey :: GpgKeyId -> User -> IO Bool hasPrivKey (GpgKeyId keyid) (User u) = catchBoolIO $ - snd <$> processTranscript "su" ["-c", "gpg --list-secret-keys " ++ shellEscape keyid, u] Nothing + snd <$> processTranscript "su" ["--login", "-c", "gpg --list-secret-keys " ++ shellEscape keyid, u] Nothing hasPubKey :: GpgKeyId -> User -> IO Bool hasPubKey (GpgKeyId keyid) (User u) = catchBoolIO $ - snd <$> processTranscript "su" ["-c", "gpg --list-public-keys " ++ shellEscape keyid, u] Nothing + snd <$> processTranscript "su" ["--login", "-c", "gpg --list-public-keys " ++ shellEscape keyid, u] Nothing dotDir :: User -> IO FilePath dotDir (User u) = do |
