aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initoverlay.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-25 02:34:39 +0900
committerOphestra <cat@gensokyo.uk>2025-08-25 02:42:22 +0900
commit33d2dcce1bb6dfa7997ee87e5b907076982acd21 (patch)
tree8d194e422e69504f70771c3678afa744f967a95d /container/initoverlay.go
parent2baa2d7063468e6da2ae68348737cee33ffbda9f (diff)
container/initoverlay: internal bypass sysroot prefix
This is for supporting overlay mounts for autoroot. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/initoverlay.go')
-rw-r--r--container/initoverlay.go8
1 files changed, 7 insertions, 1 deletions
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)
}