diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-26 17:33:43 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-26 17:33:43 -0400 |
| commit | c85c462c617fe31c3fe8c97d85db4bcae838a8b2 (patch) | |
| tree | ee4bba7bfafcec2e0cff92597d2e7b86db8f7ad0 /src/Propellor/Property/Sudo.hs | |
| parent | e4ac94860bcc4511370e878e14ef9d45b60aeb2a (diff) | |
more ported
Diffstat (limited to 'src/Propellor/Property/Sudo.hs')
| -rw-r--r-- | src/Propellor/Property/Sudo.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Propellor/Property/Sudo.hs b/src/Propellor/Property/Sudo.hs index ed6ba2d5..45ab8af2 100644 --- a/src/Propellor/Property/Sudo.hs +++ b/src/Propellor/Property/Sudo.hs @@ -9,12 +9,13 @@ import Propellor.Property.User -- | Allows a user to sudo. If the user has a password, sudo is configured -- to require it. If not, NOPASSWORD is enabled for the user. -enabledFor :: User -> Property NoInfo -enabledFor user@(User u) = property desc go `requires` Apt.installed ["sudo"] +enabledFor :: User -> Property DebianLike +enabledFor user@(User u) = go `requires` Apt.installed ["sudo"] where - go = do + go :: Property UnixLike + go = property' desc $ \w -> do locked <- liftIO $ isLockedPassword user - ensureProperty $ + ensureProperty w $ fileProperty desc (modify locked . filter (wanted locked)) "/etc/sudoers" |
