From 0ad4421ff9ace9fb9953ee5ec0c2052ce37f36ba Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 30 Apr 2021 16:55:08 -0700 Subject: reflect *MOUNT-BELOW* in OPENED-FILESYSTEM values Signed-off-by: Sean Whitton --- src/connection/chroot.lisp | 13 +++++++++++++ src/connection/fork.lisp | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src/connection') diff --git a/src/connection/chroot.lisp b/src/connection/chroot.lisp index 802d3ce..21d0cc2 100644 --- a/src/connection/chroot.lisp +++ b/src/connection/chroot.lisp @@ -81,6 +81,19 @@ should be the mount point, without the chroot's root prefixed.") (chroot-mount connection "-t" "efivarfs" "-o" "nosuid,noexec,nodev" "efivarfs" "/sys/firmware/efi/efivars"))))) +(defmethod propagate-connattr + ((type (eql :opened-volumes)) connattr (connection chroot-connection)) + (with-slots (into) connection + (loop for volume in connattr + when (and (subtypep (type-of volume) 'disk:filesystem) + (slot-boundp volume 'disk:mount-point) + (subpathp (disk:mount-point volume) into)) + collect (let ((copy (disk:copy-volume-and-contents volume))) + (setf (disk:mount-point copy) + (in-chroot-pathname (disk:mount-point copy) into)) + copy) + else collect volume))) + ;;;; :CHROOT.FORK diff --git a/src/connection/fork.lisp b/src/connection/fork.lisp index 0bc139c..072145c 100644 --- a/src/connection/fork.lisp +++ b/src/connection/fork.lisp @@ -111,7 +111,3 @@ for example, such that we don't see it." (error "Fork connection child failed, exit code ~D" exit-status)) (values nil (if (zerop status) :no-change nil)))))))))) - -(defmethod propagate-connattr - ((type (eql :opened-volumes)) connattr (connection fork-connection)) - connattr) -- cgit v1.2.3