diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-09-15 13:28:11 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-09-15 13:29:44 -0400 |
commit | 912f952c1f549cf82c326d60585850b8343d4537 (patch) | |
tree | 79cce9a6e71138111a2b6325654676126b491162 /libpod | |
parent | 0be5836e49da38b156951639b7e19eaec6a6e593 (diff) | |
download | podman-912f952c1f549cf82c326d60585850b8343d4537.tar.gz podman-912f952c1f549cf82c326d60585850b8343d4537.tar.bz2 podman-912f952c1f549cf82c326d60585850b8343d4537.zip |
Fix --systemd=always regression
The kernel will not allow you to modify existing mount flags on a volume
when bind mounting it to another place. Since /sys/fs/cgroup/systemd is
mounted noexec on the host, it needs to be mounted with the same flags
in the rootless container.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 3bdf28e8c..dde7cafb1 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -635,7 +635,7 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro Destination: "/sys/fs/cgroup/systemd", Type: "bind", Source: "/sys/fs/cgroup/systemd", - Options: []string{"bind", "nodev", "nosuid", "rprivate"}, + Options: []string{"bind", "nodev", "noexec", "nosuid", "rprivate"}, } g.AddMount(systemdMnt) g.AddLinuxMaskedPaths("/sys/fs/cgroup/systemd/release_agent") |