aboutsummaryrefslogtreecommitdiff
path: root/src/connection/setuid.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-04-01 18:19:47 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-04-01 18:32:31 -0700
commitb6b26120f58e4d0b4bb884b44c7cc867cd90c8a0 (patch)
tree867b138c481bbfd42ea25db969e897a3c3624da6 /src/connection/setuid.lisp
parented8c76f566de8f6c10cdace515b3d076026258f0 (diff)
downloadconsfigurator-b6b26120f58e4d0b4bb884b44c7cc867cd90c8a0.tar.gz
connection chain specs.: consistently use :USER for the target user
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/setuid.lisp')
-rw-r--r--src/connection/setuid.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/connection/setuid.lisp b/src/connection/setuid.lisp
index 6fba4c2..f99e4b8 100644
--- a/src/connection/setuid.lisp
+++ b/src/connection/setuid.lisp
@@ -20,12 +20,13 @@
(defclass setuid-connection (rehome-connection fork-connection) ())
-(defmethod establish-connection ((type (eql :setuid)) remaining &key to)
+(defmethod establish-connection ((type (eql :setuid)) remaining &key user)
(unless (and (lisp-connection-p) (zerop (nix:geteuid)))
(error "~&SETUIDing requires a Lisp image running as root"))
- (informat 1 "~&SETUIDing to ~A" to)
- (let* ((ent (or (osicat:user-info to)
- (failed-change "~&Could not look up user info for ~A." to)))
+ (informat 1 "~&SETUIDing to ~A" user)
+ (let* ((ent
+ (or (osicat:user-info user)
+ (failed-change "~&Could not look up user info for ~A." user)))
(xdg-cache-home
(ensure-directory-pathname
(stripln