diff options
Diffstat (limited to 'container/initoverlay.go')
| -rw-r--r-- | container/initoverlay.go | 8 |
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) } |
