aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2025-09-17 14:04:52 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-09-18 17:17:10 +0200
commitc66be2c2a0d4448623a32211222c5abf2e6aa7f4 (patch)
treec4a56f0b230ad27d1bea442907924941859b94a0
parentfd1bcc30af0778715666434799180ee456c0c83f (diff)
downloadpasst-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar.gz
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar.bz2
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar.lz
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar.xz
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.tar.zst
passt-c66be2c2a0d4448623a32211222c5abf2e6aa7f4.zip
selinux: add missing file contexts for Podman
Podman may also use directories under /tmp if XDG_RUNTIME_DIR is not defined. Make sure the policy defined the right context for them as well. Link: https://github.com/containers/podman/issues/26473 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2373054 Signed-off-by: Paul Holzinger <pholzing@redhat.com> [sbrivio: minor style fixes] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--contrib/selinux/pasta.fc6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/selinux/pasta.fc b/contrib/selinux/pasta.fc
index e4aefc4..e60c614 100644
--- a/contrib/selinux/pasta.fc
+++ b/contrib/selinux/pasta.fc
@@ -14,3 +14,9 @@
/var/run/pasta\.pid system_u:object_r:pasta_pid_t:s0
/run/user/%{USERID}/netns system_u:object_r:ifconfig_var_run_t:s0
/run/user/%{USERID}/containers/networks/rootless-netns system_u:object_r:ifconfig_var_run_t:s0
+# In case XDG_RUNTIME_DIR is not set (i.e. no systemd user session) Podman falls
+# back to a location under /tmp
+/tmp/storage-run-%{USERID}/netns system_u:object_r:ifconfig_var_run_t:s0
+/tmp/storage-run-%{USERID}/containers/networks/rootless-netns system_u:object_r:ifconfig_var_run_t:s0
+/tmp/containers-user-%{USERID}/netns system_u:object_r:ifconfig_var_run_t:s0
+/tmp/containers-user-%{USERID}/containers/networks/rootless-netns system_u:object_r:ifconfig_var_run_t:s0