1
0
mirror of https://passt.top/passt synced 2024-07-07 02:05:54 +00:00
passt/contrib/apparmor/abstractions/passt
Stefano Brivio dc7b7f28b7 apparmor: Add mount rule with explicit, empty source in passt abstraction
For the policy to work as expected across either AppArmor commit
9d3f8c6cc05d ("parser: fix parsing of source as mount point for
propagation type flags") and commit 300889c3a4b7 ("parser: fix option
flag processing for single conditional rules"), we need one mount
rule with matching mount options as "source" (that is, without
source), and one without mount options and an explicit, empty source.

Link: https://github.com/containers/buildah/issues/5440
Link: https://bugzilla.suse.com/show_bug.cgi?id=1221840
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2024-04-05 12:12:26 +02:00

50 lines
1.2 KiB
Plaintext

# 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 "" -> "/",
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