aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/connection/linux-namespace.lisp2
-rw-r--r--src/package.lisp2
-rw-r--r--src/property/lxc.lisp2
-rw-r--r--src/property/user.lisp10
4 files changed, 8 insertions, 8 deletions
diff --git a/src/connection/linux-namespace.lisp b/src/connection/linux-namespace.lisp
index 398cf63..c5c3809 100644
--- a/src/connection/linux-namespace.lisp
+++ b/src/connection/linux-namespace.lisp
@@ -114,7 +114,7 @@
(defmethod initialize-instance :after
((connection lxc-unpriv-attach-connection) &key)
(with-slots (owner owner-uid) connection
- (when owner (setf owner-uid (user:passwd-entry 2 owner)))))
+ (when owner (setf owner-uid (user:passwd-field 2 owner)))))
(defmethod connection-shell-wrap
((connection lxc-unpriv-attach-connection) cmd)
diff --git a/src/package.lisp b/src/package.lisp
index 4d27970..8d2848d 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -554,7 +554,7 @@
#:has-login-shell
#:has-enabled-password
#:has-locked-password
- #:passwd-entry))
+ #:passwd-field))
(package :consfigurator.property.chroot
(:local-nicknames (#:service #:consfigurator.property.service)
diff --git a/src/property/lxc.lisp b/src/property/lxc.lisp
index 3f9a29f..02575ae 100644
--- a/src/property/lxc.lisp
+++ b/src/property/lxc.lisp
@@ -309,7 +309,7 @@ implications."
(let* ((runuser
(and owner (not (string= owner (get-connattr :remote-user)))))
(uid (if runuser
- (user:passwd-entry 2 owner)
+ (user:passwd-field 2 owner)
(get-connattr :remote-uid))))
(apply #'run :env `(:DBUS_SESSION_BUS_ADDRESS nil
:XDG_RUNTIME_DIR ,(format nil "/run/user/~D" uid))
diff --git a/src/property/user.lisp b/src/property/user.lisp
index f9f7f4d..6bc87d8 100644
--- a/src/property/user.lisp
+++ b/src/property/user.lisp
@@ -31,14 +31,14 @@ Note that this uses getent(1) and so is not strictly POSIX-compatible."
(defprop %has-uid-gid :posix (username uid gid)
(:check
- (and (= uid (parse-integer (passwd-entry 2 username)))
- (= gid (parse-integer (passwd-entry 3 username)))
+ (and (= uid (parse-integer (passwd-field 2 username)))
+ (= gid (parse-integer (passwd-field 3 username)))
(= gid (parse-integer (group-entry 2 username)))))
(:apply
(let* ((gid-str (write-to-string gid))
(uid-str (write-to-string uid))
(uid+gid (format nil "~d:~d" uid gid))
- (home (passwd-entry 5 username)))
+ (home (passwd-field 5 username)))
(mrun "groupmod" "--gid" gid-str username)
(mrun "usermod" "--uid" uid-str "--gid" gid-str username)
(mrun "chown" "-R" uid+gid home))))
@@ -88,7 +88,7 @@ the installation of other software."
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))
+ (string= (passwd-field 6 username) shell))
(:apply
(file:contains-lines "/etc/shells" shell)
(mrun "chsh" "--shell" shell username)))
@@ -127,7 +127,7 @@ and then this property will do nothing."
(nth n (split-string (stripln (mrun "getent" database u))
:separator ":"))))
-(defun passwd-entry (n username-or-uid)
+(defun passwd-field (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."