[PATCH consfigurator] add user:has-user-with-uid
Sean Whitton
spwhitton at spwhitton.name
Fri Sep 3 20:27:41 BST 2021
Hello David,
Looks good, thanks. A few minor change requests:
On Sun 29 Aug 2021 at 05:23PM -07, David Bremner wrote:
> diff --git a/src/property/user.lisp b/src/property/user.lisp
> index be7ca36..504705d 100644
> --- a/src/property/user.lisp
> +++ b/src/property/user.lisp
> @@ -29,6 +29,28 @@ Note that this uses getent(1) and so is not strictly POSIX-compatible."
> (assert-euid-root)
> (mrun "useradd" "-m" username)))
>
> +(defprop %has-uid-gid :posix (username uid gid)
> + "Ensure USERNAME has given UID and GID, and matching ownership of home directory.
> +Note that this uses getent(1) and so is not strictly POSIX-compatible."
Given that this property is not exported I think you can dispense with
the getent(1) warning.
The first line of the docstring is a bit long; my Emacs wants to wrap it
after 'home'. Maybe "and matching ownership of HOME" if you want to
ensure it fits on one line?
> +(defproplist has-user-with-uid :posix (username uid &key (gid uid))
How about calling it HAS-ACCOUNT-WITH-UID for consistency with the other
property?
> + "Ensure there is an account for USERNAME with uid UID .
Typo of an extra space here.
--
Sean Whitton
More information about the sgo-software-discuss
mailing list