public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Paul Holzinger <pholzing@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: Max Chernoff <git@maxchernoff.ca>,
	Giuseppe Scrivano <gscrivan@redhat.com>,
	Lokesh Mandvekar <lmandvek@redhat.com>,
	Dan Walsh <dwalsh@redhat.com>,
	Paul Holzinger <pholzing@redhat.com>
Subject: [PATCH 2/2] selinux: add missing file contexts for Podman
Date: Wed, 17 Sep 2025 14:04:52 +0200	[thread overview]
Message-ID: <20250917120450.36181-4-pholzing@redhat.com> (raw)
In-Reply-To: <20250917120450.36181-2-pholzing@redhat.com>

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>
---
 contrib/selinux/pasta.fc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/selinux/pasta.fc b/contrib/selinux/pasta.fc
index e4aefc4..c0f91df 100644
--- a/contrib/selinux/pasta.fc
+++ b/contrib/selinux/pasta.fc
@@ -14,3 +14,8 @@
 /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
-- 
2.51.0


  reply	other threads:[~2025-09-17 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 12:04 [PATCH 1/2] selinux: add container_var_run_t type transition Paul Holzinger
2025-09-17 12:04 ` Paul Holzinger [this message]
2025-09-17 15:05   ` [PATCH 2/2] selinux: add missing file contexts for Podman Stefano Brivio
2025-09-17 15:05 ` [PATCH 1/2] selinux: add container_var_run_t type transition Stefano Brivio
2025-09-17 15:54   ` Paul Holzinger
2025-09-18 16:01 ` Stefano Brivio
     [not found]   ` <CAFiEh0am6Pn7RGANe-0oQM-=-U=BXKD3afoRoefH4-3Ou1gVvA@mail.gmail.com>
2025-09-19 23:06     ` Stefano Brivio
2025-09-19 23:13       ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250917120450.36181-4-pholzing@redhat.com \
    --to=pholzing@redhat.com \
    --cc=dwalsh@redhat.com \
    --cc=git@maxchernoff.ca \
    --cc=gscrivan@redhat.com \
    --cc=lmandvek@redhat.com \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).