From e4bda1ac845991cb79e6f3ad21db1d54ee36ddd2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 23 May 2021 12:35:35 -0700 Subject: note that getent(1) is not strictly POSIX-compatible Signed-off-by: Sean Whitton --- src/property/user.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/property/user.lisp') diff --git a/src/property/user.lisp b/src/property/user.lisp index 705678c..416ab6a 100644 --- a/src/property/user.lisp +++ b/src/property/user.lisp @@ -29,7 +29,8 @@ (run "useradd" "-m" username))) (defprop has-login-shell :posix (username shell) - "Ensures that USERNAME has login shell SHELL." + "Ensures that USERNAME has login shell SHELL. +Note that this uses getent(1) and so is not strictly POSIX-compatible." (:desc #?"${username} has login shell ${shell}") (:check (string= (passwd-entry 6 username) shell)) @@ -38,6 +39,9 @@ (mrun "chsh" "--shell" shell username))) (defun passwd-entry (n username-or-uid) + "Get the nth entry in the getent(1) output for USERNAME-OR-UID. +Note that getent(1) is not specified in POSIX so use of this function makes +properties not strictly POSIX-compatible." (let ((u (etypecase username-or-uid (string username-or-uid) (number (write-to-string username-or-uid))))) -- cgit v1.2.3