public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: "Giuseppe Scrivano" <gscrivan@redhat.com>,
	"Jan Rodák" <jrodak@redhat.com>
Subject: [PATCH] apparmor: Use user-tmp abstraction, allow /var/tmp instead of /tmp only
Date: Fri, 25 Sep 2026 22:59:46 +0200	[thread overview]
Message-ID: <20260925205946.1980078-1-sbrivio@redhat.com> (raw)

Podman overrides TMPDIR to /var/tmp, and an upcoming change in the
requires pasta to write its PID file to TMPDIR.

To support this in the AppArmor policy, we need to loosen the existing
rule restricting file writes to /tmp/ and subpaths in order to include
common alternative paths for TMPDIR: the user-tmp abstraction does
exactly this.

Reported-by: Giuseppe Scrivano <gscrivan@redhat.com>
Link: https://github.com/podman-container-tools/container-libs/pull/1207
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 contrib/apparmor/usr.bin.passt | 3 +--
 contrib/apparmor/usr.bin.pasta | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/contrib/apparmor/usr.bin.passt b/contrib/apparmor/usr.bin.passt
index c123a86..da49e37 100644
--- a/contrib/apparmor/usr.bin.passt
+++ b/contrib/apparmor/usr.bin.passt
@@ -18,8 +18,7 @@ include <tunables/global>
 profile passt /usr/bin/passt{,.avx2} {
   include <abstractions/passt>
 
-  # Alternatively: include <abstractions/user-tmp>
-  owner /tmp/**				w,	# tap_sock_unix_open(),
+  include <abstractions/user-tmp>		# tap_sock_unix_open(),
 						# tap_sock_unix_init(), pcap(),
 						# pidfile_open(),
 						# pidfile_write(),
diff --git a/contrib/apparmor/usr.bin.pasta b/contrib/apparmor/usr.bin.pasta
index 56b5024..32dfad9 100644
--- a/contrib/apparmor/usr.bin.pasta
+++ b/contrib/apparmor/usr.bin.pasta
@@ -18,8 +18,7 @@ include <tunables/global>
 profile pasta /usr/bin/pasta{,.avx2} flags=(attach_disconnected) {
   include <abstractions/pasta>
 
-  # Alternatively: include <abstractions/user-tmp>
-  /tmp/**				rw,	# tap_sock_unix_open(),
+  include <abstractions/user-tmp>		# tap_sock_unix_open(),
 						# tap_sock_unix_init(), pcap(),
 						# pidfile_open(),
 						# pidfile_write(),
-- 
2.43.0


                 reply	other threads:[~2026-09-25 20:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260925205946.1980078-1-sbrivio@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=gscrivan@redhat.com \
    --cc=jrodak@redhat.com \
    --cc=passt-dev@passt.top \
    /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).