From 33d2dcce1bb6dfa7997ee87e5b907076982acd21 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 25 Aug 2025 02:34:39 +0900 Subject: container/initoverlay: internal bypass sysroot prefix This is for supporting overlay mounts for autoroot. Signed-off-by: Ophestra --- container/initoverlay.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'container/initoverlay.go') diff --git a/container/initoverlay.go b/container/initoverlay.go index 2c6f43c6..c9138706 100644 --- a/container/initoverlay.go +++ b/container/initoverlay.go @@ -64,6 +64,9 @@ type MountOverlayOp struct { work string ephemeral bool + + // used internally for mounting to the intermediate root + noPrefix bool } func (o *MountOverlayOp) Valid() bool { @@ -126,7 +129,10 @@ func (o *MountOverlayOp) early(_ *setupState, k syscallDispatcher) error { } func (o *MountOverlayOp) apply(state *setupState, k syscallDispatcher) error { - target := toSysroot(o.Target.String()) + target := o.Target.String() + if !o.noPrefix { + target = toSysroot(target) + } if err := k.mkdirAll(target, state.ParentPerm); err != nil { return wrapErrSelf(err) } -- cgit v1.3.1