aboutsummaryrefslogtreecommitdiff
path: root/src/connection/linux-namespace.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection/linux-namespace.lisp')
-rw-r--r--src/connection/linux-namespace.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/connection/linux-namespace.lisp b/src/connection/linux-namespace.lisp
index 2924f2e..a17b4e4 100644
--- a/src/connection/linux-namespace.lisp
+++ b/src/connection/linux-namespace.lisp
@@ -277,6 +277,8 @@ setgroups(2) is denied in the namespace."
(let ((owner (get-userns-owner (caar ns-fds))))
(if (zerop owner)
(nix:setgroups nil)
+ ;; We can't use USER:USER-INFO here because we can't
+ ;; run commands using RUNLINES.
(alet (osicat:user-info owner)
;; As a precaution, we could also setuid & setgid to
;; OWNER here. However, it ought to be meaningless
@@ -330,6 +332,8 @@ setgroups(2) is denied in the namespace."
(nix:fchdir root-fd) (chroot ".")))
(mapc #'nix:close opened-fds))
(when uid
+ ;; We similarly can't use USER:USER-INFO here because we still can't
+ ;; run commands using RUNLINES.
(alet (or (osicat:user-info uid)
(error "~&Could not look up user info for UID ~A." uid))
(setf user (cdr (assoc :name it)))