mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
new 'no-dereference' mount option
Add a new `no-dereference` mount option supported by crun 1.11+ to re-create/copy a symlink if it's the source of a mount. By default the kernel will resolve the symlink on the host and mount the target. As reported in #20098, there are use cases where the symlink structure must be preserved by all means. Fixes: #20098 Fixes: issues.redhat.com/browse/RUN-1935 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -366,7 +366,11 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc
|
||||
if err := c.relabel(m.Source, c.MountLabel(), label.IsShared(o)); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
case "no-dereference":
|
||||
// crun calls the option `copy-symlink`.
|
||||
// Podman decided for --no-dereference as many
|
||||
// bin-utils tools (e..g, touch, chown, cp) do.
|
||||
options = append(options, "copy-symlink")
|
||||
default:
|
||||
options = append(options, o)
|
||||
}
|
||||
|
Reference in New Issue
Block a user