* [PATCH] apparmor: allow netns paths on /tmp
@ 2024-05-13 17:41 Paul Holzinger
2024-05-13 21:37 ` Stefano Brivio
0 siblings, 1 reply; 2+ messages in thread
From: Paul Holzinger @ 2024-05-13 17:41 UTC (permalink / raw)
To: passt-dev; +Cc: Paul Holzinger
For some unknown reason "owner" makes it impossible to open bind mounted
netns references as apparmor denies it. In the kernel denied log entry
we see ouid=0 but it is not clear why that is as the actual file is
owned by the real (rootless) user id.
In abstractions/pasta there is already `@{run}/user/@{uid}/**` without
owner set for the same reason as this path contains the netns path by
default when running under Podman.
Fixes: 72884484b00d ("apparmor: allow read access on /tmp for pasta")
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
---
contrib/apparmor/usr.bin.pasta | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/apparmor/usr.bin.pasta b/contrib/apparmor/usr.bin.pasta
index 2a4d28c..bdfeb71 100644
--- a/contrib/apparmor/usr.bin.pasta
+++ b/contrib/apparmor/usr.bin.pasta
@@ -19,7 +19,7 @@ profile pasta /usr/bin/pasta{,.avx2} flags=(attach_disconnected) {
include <abstractions/pasta>
# Alternatively: include <abstractions/user-tmp>
- owner /tmp/** rw, # tap_sock_unix_init(), pcap(),
+ /tmp/** rw, # tap_sock_unix_init(), pcap(),
# write_pidfile(),
# logfile_init(),
# pasta_open_ns()
--
@@ -19,7 +19,7 @@ profile pasta /usr/bin/pasta{,.avx2} flags=(attach_disconnected) {
include <abstractions/pasta>
# Alternatively: include <abstractions/user-tmp>
- owner /tmp/** rw, # tap_sock_unix_init(), pcap(),
+ /tmp/** rw, # tap_sock_unix_init(), pcap(),
# write_pidfile(),
# logfile_init(),
# pasta_open_ns()
--
2.45.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] apparmor: allow netns paths on /tmp
2024-05-13 17:41 [PATCH] apparmor: allow netns paths on /tmp Paul Holzinger
@ 2024-05-13 21:37 ` Stefano Brivio
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Brivio @ 2024-05-13 21:37 UTC (permalink / raw)
To: Paul Holzinger; +Cc: passt-dev
On Mon, 13 May 2024 19:41:55 +0200
Paul Holzinger <pholzing@redhat.com> wrote:
> For some unknown reason "owner" makes it impossible to open bind mounted
> netns references as apparmor denies it. In the kernel denied log entry
> we see ouid=0 but it is not clear why that is as the actual file is
> owned by the real (rootless) user id.
>
> In abstractions/pasta there is already `@{run}/user/@{uid}/**` without
> owner set for the same reason as this path contains the netns path by
> default when running under Podman.
>
> Fixes: 72884484b00d ("apparmor: allow read access on /tmp for pasta")
>
> Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Applied.
--
Stefano
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-13 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 17:41 [PATCH] apparmor: allow netns paths on /tmp Paul Holzinger
2024-05-13 21:37 ` Stefano Brivio
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).