diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-03 02:27:17 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-03 02:27:17 -0400 |
| commit | fdb48b1dd11b802d0c2124fb3833672ca87ab870 (patch) | |
| tree | 6537cfb4d2211eaf478411ca95cec56dbe706bcc /Propellor/Property/Sudo.hs | |
| parent | 9a9f249ff0cfe2b5f601c84368457245ddb4d78b (diff) | |
api doc improvements
Diffstat (limited to 'Propellor/Property/Sudo.hs')
| -rw-r--r-- | Propellor/Property/Sudo.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Propellor/Property/Sudo.hs b/Propellor/Property/Sudo.hs index dbb3e460..68b8d056 100644 --- a/Propellor/Property/Sudo.hs +++ b/Propellor/Property/Sudo.hs @@ -7,11 +7,8 @@ import Propellor.Property.File import qualified Propellor.Property.Apt as Apt 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. - - - - TOOD: Full sudoers file format parse.. - -} +-- | 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 :: UserName -> Property enabledFor user = Property desc go `requires` Apt.installed ["sudo"] where @@ -26,6 +23,7 @@ enabledFor user = Property desc go `requires` Apt.installed ["sudo"] sudoline True = sudobaseline ++ " NOPASSWD:ALL" sudoline False = sudobaseline ++ " ALL" wanted locked l + -- TOOD: Full sudoers file format parse.. | not (sudobaseline `isPrefixOf` l) = True | "NOPASSWD" `isInfixOf` l = locked | otherwise = True |
