e2ad420fa2
Starting with commit770d1a4502
("isolation: Initially Keep CAP_SETFCAP if running as UID 0 in non-init"), the lack of this rule became more apparent as pasta needs to access uid_map in procfs even as non-root. However, both passt and pasta needs this, in case they are started as root, so add this directly to passt's abstraction (which is sourced by pasta's profile too). Fixes:770d1a4502
("isolation: Initially Keep CAP_SETFCAP if running as UID 0 in non-init") Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
48 lines
1.1 KiB
Text
48 lines
1.1 KiB
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/abstractions/passt - Abstraction for passt(1)
|
|
#
|
|
# Copyright (c) 2022 Red Hat GmbH
|
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/nameservice> # get_dns(), conf.c
|
|
|
|
capability net_bind_service, # isolation.c, conf.c
|
|
capability setuid,
|
|
capability setgid,
|
|
capability sys_admin,
|
|
capability setpcap,
|
|
capability net_admin,
|
|
capability sys_ptrace,
|
|
|
|
/ r, # isolate_prefork(), isolation.c
|
|
mount options=(rw, runbindable) /,
|
|
mount "" -> "/tmp/",
|
|
pivot_root "/tmp/" -> "/tmp/",
|
|
umount "/",
|
|
|
|
owner @{PROC}/@{pid}/uid_map r, # conf_ugid()
|
|
|
|
network netlink raw, # nl_sock_init_do(), netlink.c
|
|
|
|
network inet stream, # tcp.c
|
|
network inet6 stream,
|
|
|
|
network inet dgram, # udp.c
|
|
network inet6 dgram,
|
|
|
|
network unix stream, # tap.c
|
|
|
|
network unix dgram, # __openlog(), log.c
|
|
|
|
/usr/bin/passt.avx2 ix, # arch_avx2_exec(), arch.c
|