spiegel_podman/cmd
Paul Holzinger a158eae7ff
podman run use pod userns even with --pod-id-file
The pod was set after we checked the namespace and the namespace code
only checked the --pod flag but didn't consider --pod-id-file option.
As such fix the check to first set the pod option on the spec then use
that for the namespace. Also make sure we always use an empty default
otherwise it would be impossible in the backend to know if a user
requested a specific userns or not, i.e. even in case of a set
PODMAN_USERNS env a container should still get the userns from the pod
and not use the var in this case. Therefore unset it from the default
cli value.

There are more issues here around --pod-id-file and cli validation that
does not consider the option as conflicting with --userns like --pod
does but I decided to fix the bug at hand and don't try to fix the
entire mess which most likely would take days.

Fixes #22931

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-24 17:18:08 +02:00
..
podman podman run use pod userns even with --pod-id-file 2024-06-24 17:18:08 +02:00
podman-mac-helper cmd: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00
podman-testing System tests: add podman system check tests 2024-06-04 10:00:37 -04:00
podman-wslkerninst Fix Lint on Windows and enable the job 2024-02-20 08:06:18 -05:00
quadlet Quadlet: Add support for .build files 2024-05-27 16:59:39 +02:00
rootlessport update github.com/rootless-containers/rootlesskit to v2 2024-04-05 12:25:02 +02:00
winpath Fix Lint on Windows and enable the job 2024-02-20 08:06:18 -05:00