mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Set base mount options for bind mounts from base system
If I mount, say, /usr/bin into my container - I expect to be able to run the executables in that mount. Unconditionally applying noexec would be a bad idea. Before my patches to change mount options and allow exec/dev/suid being set explicitly, we inferred the mount options from where on the base system the mount originated, and the options it had there. Implement the same functionality for the new option handling. There's a lot of performance left on the table here, but I don't know that this is ever going to take enough time to make it worth optimizing. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -1360,7 +1360,7 @@ func WithNamedVolumes(volumes []*ContainerNamedVolume) CtrCreateOption {
|
||||
}
|
||||
destinations[vol.Dest] = true
|
||||
|
||||
mountOpts, err := util.ProcessOptions(vol.Options, false)
|
||||
mountOpts, err := util.ProcessOptions(vol.Options, false, nil)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error processing options for named volume %q mounted at %q", vol.Name, vol.Dest)
|
||||
}
|
||||
|
Reference in New Issue
Block a user