diff options
Diffstat (limited to 'src/Propellor/Property/User.hs')
| -rw-r--r-- | src/Propellor/Property/User.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Property/User.hs b/src/Propellor/Property/User.hs index 549aa07f..f79ede63 100644 --- a/src/Propellor/Property/User.hs +++ b/src/Propellor/Property/User.hs @@ -46,8 +46,13 @@ hasPassword user = hasPassword' user hostContext hasPassword' :: IsContext c => UserName -> c -> Property hasPassword' user context = go `requires` shadowConfig True where - go = withSomePrivData [CryptPassword user, Password user] context $ + go = withSomePrivData srcs context $ property (user ++ " has password") . setPassword + srcs = + [ PrivDataSource (CryptPassword user) + "a crypt(3)ed password, which can be generated by, for example: perl -e 'print crypt(shift, q{$6$}.shift)' 'somepassword' 'somesalt'" + , PrivDataSource (Password user) ("a password for " ++ user) + ] setPassword :: (((PrivDataField, PrivData) -> Propellor Result) -> Propellor Result) -> Propellor Result setPassword getpassword = getpassword $ go |
