summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/User.hs
AgeCommit message (Collapse)Author
2017-07-10User: add systemGroup and use it for systemAccountFor'Félix Sipma
2017-06-20User.hasInsecurePassword makes sure shadow passwords are enabledJoey Hess
So if the insecure password is later changed, the new password won't be exposed.
2017-02-04CloudAtCost requires User.nuked to be Property LinuxZihao Wang
Signed-off-by: Zihao Wang <dev@wzhd.org>
2016-03-25finished porting Property.UserJoey Hess
2016-03-24convertedJoey Hess
Assuming DebianLike for all these properties until I hear otherwise.
2015-12-14User: systemAccountFor and systemAccountFor'Félix Sipma
(cherry picked from commit f56f9696a998d32d6d5c4eca29b28ee60def2db0)
2015-12-14User: add systemAccountFor and simpleSystemAccount propertiesFélix Sipma
(cherry picked from commit 4075a38db0fad4ef6e0c99e13c40ad9e0d54ec8b)
2015-12-06allow using `check` on a UncheckedProperty, which yields a PropertyJoey Hess
2015-12-05UncheckedProperty for cmdProperty et alJoey Hess
* Properties that run an arbitrary command, such as cmdProperty and scriptProperty are converted to use UncheckedProperty, since they cannot tell on their own if the command truely made a change or not. (API Change) Transition guide: - When GHC complains about an UncheckedProperty, add: `assume` MadeChange - Since these properties used to always return MadeChange, that change is always safe to make. - Or, if you know that the command should modifiy a file, use: `changesFile` filename * A few properties have had their Result improved, for example Apt.buldDep and Apt.autoRemove now check if a change was made or not.
2015-11-25unused importJoey Hess
2015-11-24User.hasDesktopGroups changed to avoid trying to add the user to groups that ↵Joey Hess
don't exist. This is the same method user-setup uses.
2015-11-24Added User.hasDesktopGroups property.Joey Hess
Based on a property in spwhitton's config, but rewritten.
2015-10-22hasInsecurePasswordJoey Hess
2015-10-10propellor spinJoey Hess
2015-09-14clean up privdata excess/lacking newline issueJoey Hess
* PrivData converted to newtype (API change). * Stopped stripping trailing newlines when setting PrivData; this was previously done to avoid mistakes when pasting eg passwords with an unwanted newline. Instead, PrivData consumers should use either privDataLines or privDataVal, to extract respectively lines or a value (without internal newlines) from PrivData.
2015-04-22API change: Added User and Group newtypes, and Properties that used to use ↵Joey Hess
the type UserName = String were changed to use them. Note that UserName is kept and PrivData still uses it in its sum type. This is to avoid breaking PrivData serialization.
2015-04-19Added hasLoginShell and shellEnabled.Joey Hess
My code with some improvements from weinzwang.
2015-01-24GADT properties seem to work (untested)Joey Hess
* Property has been converted to a GADT, and will be Property NoInfo or Property HasInfo. This was done to make sure that ensureProperty is only used on properties that do not have Info. Transition guide: - Change all "Property" to "Property NoInfo" or "Property WithInfo" (The compiler can tell you if you got it wrong!) - To construct a RevertableProperty, it is useful to use the new (<!>) operator - Constructing a list of properties can be problimatic, since Property NoInto and Property WithInfo are different types and cannot appear in the same list. To deal with this, "props" has been added, and can built up a list of properties of different types, using the same (&) and (!) operators that are used to build up a host's properties.
2014-12-14broke up big function to describe PrivDataFieldJoey Hess
2014-12-14support for crypted passwords in privdataJoey Hess
* Added CryptPassword to PrivDataField, for password hashes as produced by crypt(3). * User.hasPassword and User.hasSomePassword will now use either a CryptPassword or a Password from privdata, depending on which is set.
2014-12-07Fixed privdata introspection for User.hasPassword and User.hasSomePasswordJoey Hess
This is not a complete fix for the problem that Info doen't propigate from the called property when code does something like: do hostname <- asks hostName ensureProperty $ foo hostname Instead, I just eliminated the need to implement hasPassword that way, by making the PrivData Info use a HostContext which automatically gets the right hostname passed to it. All other uses of withPrivData don't have the problem. It's still possible for the user to run into the problem if they write something like the above, where foo is a property that uses privdata. However, all properties that take a Context now also accept a HostContext, so it's at least less likely the user needs to write that.
2014-12-05hasSomePassword and hasPassword now check to make sure shadow passwords are ↵Joey Hess
enabled.
2014-12-04more work on OS takeoverJoey Hess
2014-11-23hasSomePassword and hasPassword now default to using the name of the host as ↵Joey Hess
the Context for the password. To specify a different context, use hasSomePassword' and hasPassword' (API change)
2014-11-23preferred styleJoey Hess
2014-11-23User: hasGroupFélix Sipma
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
2014-07-06propellor spinJoey Hess
2014-05-14moved source code to srcJoey Hess
This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work.