spiegel_podman/pkg
rcmadhankumar 6f775c9091 [v5.4-rhel] Fix: Remove appending rw as the default mount option
The backstory for this is that runc 1.2 (opencontainers/runc#3967)
fixed a long-standing bug in our mount flag handling (a bug that crun
still has). Before runc 1.2, when dealing with locked mount flags that
user namespaced containers cannot clear, trying to explicitly clearing
locked flags (like rw clearing MS_RDONLY) would silently ignore the rw
flag in most cases and would result in a read-only mount. This is
obviously not what the user expects.

What runc 1.2 did is that it made it so that passing clearing flags
like rw would always result in an attempt to clear the flag (which was
not the case before), and would (in all cases) explicitly return an
error if we try to clear locking flags. (This also let us finally fix a
bunch of other long-standing issues with locked mount flags causing
seemingly spurious errors).

The problem is that podman sets rw on all mounts by default (even if
the user doesn't specify anything). This is actually a no-op in
runc 1.1 and crun because of a bug in how clearing flags were handled
(rw is the absence of MS_RDONLY but until runc 1.2 we didn't correctly
track clearing flags like that, meaning that rw would literally be
handled as if it were not set at all by users) but in runc 1.2 leads to
unfortunate breakages and a subtle change in behaviour (before, a ro
mount being bind-mounted into a container would also be ro -- though
due to the above bug even setting rw explicitly would result in ro in
most cases -- but with runc 1.2 the mount will always be rw even if
the user didn't explicitly request it which most users would find
surprising). By the way, this "always set rw" behaviour is a departure
from Docker and it is not necesssary.

Fixes: https://issues.redhat.com/browse/RHEL-152635,
https://issues.redhat.com/browse/RHEL-152631

Signed-off-by: rcmadhankumar <madhankumar.chellamuthu@suse.com>
(cherry picked from commit bf7dcd5619)
Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2026-03-05 16:29:45 -05:00
..
annotations update golangci-lint to 1.60.1 2024-08-19 11:41:28 +02:00
api compat API: respect base_hosts_file containers.conf option 2025-10-29 15:20:45 -04:00
auth update golangci/golangci-lint to v1.63.4 2025-01-07 15:48:53 +01:00
autoupdate Vendor c/common:8483ef6022b4 2024-08-30 16:13:54 +02:00
bindings Clean up after unexpectedly terminated build 2025-01-27 14:21:27 +01:00
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint Enable pod restore with crun 2024-10-21 17:37:20 +01:00
copy Bump Go module to v5 2024-02-08 09:35:39 -05:00
criu chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
ctime update golangci/golangci-lint to v1.63.4 2025-01-07 15:48:53 +01:00
domain [v5.4-rhel] podman inspect: fix error difference between local... 2026-01-22 14:10:39 -05:00
emulation chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
env update golangci/golangci-lint to v1.63.4 2025-01-07 15:48:53 +01:00
errorhandling bump go to 1.22 2024-09-03 15:14:15 +02:00
farm bump go to 1.22 2024-09-03 15:14:15 +02:00
fileserver Bump Go module to v5 2024-02-08 09:35:39 -05:00
inspect Bump Go module to v5 2024-02-08 09:35:39 -05:00
k8s.io Add kube play support for image volume source 2024-09-10 12:37:06 +00:00
libartifact artifact: only allow single manifest 2025-02-04 15:13:00 -05:00
lookup Cease using deprecated runc userlookup 2024-02-02 11:02:43 -05:00
machine machine init: fix tls check 2025-06-23 18:01:13 +02:00
namespaces namespaces: allow configuring keep-id userns size 2025-01-08 10:08:29 +01:00
parallel Bump Go module to v5 2024-02-08 09:35:39 -05:00
ps Ignore missing containers when calling GetExternalContainerLists 2024-08-05 08:18:57 -04:00
rctl Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
rootless [v5.4-rhel] rootless_linux.c: use shortcut for system commands 2026-01-15 15:42:17 -05:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal refacto: unknown signal return signal number without prefix 2024-02-28 19:45:03 +01:00
specgen [v5.4-rhel] Vendor selinux v1.13.1 and make adjustments for selinux changes 2025-11-17 15:05:10 -05:00
specgenutil do not set the CreateCommand for API users 2025-01-22 19:13:08 +01:00
specgenutilexternal Quadlet container mount - support non key=val options 2023-09-27 16:20:00 +03:00
systemd Merge pull request #25011 from AhmedMoalla/fix-wrongly-ported-cunescape_one 2025-01-15 11:44:56 +00:00
terminal Fix Lint on Windows and enable the job 2024-02-20 08:06:18 -05:00
timetype Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
trust [v5.4-rhel] go1.23: use std maps package 2025-12-10 19:51:12 -05:00
util [v5.4-rhel] Fix: Remove appending rw as the default mount option 2026-03-05 16:29:45 -05:00