6cdc9fd51b
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: 72884484b0
("apparmor: allow read access on /tmp for pasta")
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
28 lines
724 B
Text
28 lines
724 B
Text
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
# PASST - Plug A Simple Socket Transport
|
|
# for qemu/UNIX domain socket mode
|
|
#
|
|
# PASTA - Pack A Subtle Tap Abstraction
|
|
# for network namespace/tap device mode
|
|
#
|
|
# contrib/apparmor/usr.bin.pasta - AppArmor profile for pasta(1)
|
|
#
|
|
# Copyright (c) 2022 Red Hat GmbH
|
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
|
abi <abi/3.0>,
|
|
|
|
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_init(), pcap(),
|
|
# write_pidfile(),
|
|
# logfile_init(),
|
|
# pasta_open_ns()
|
|
|
|
owner @{HOME}/** w, # pcap(), write_pidfile()
|
|
}
|