mirror of
https://passt.top/passt
synced 2024-11-05 20:31:11 +00:00
63a8302961
If pasta and pasta.avx2 are hard links to passt and passt.avx2, AppArmor will attach their own profiles on execution, and we can restrict passt's profile to what it actually needs. Note that pasta needs to access all the resources that passt needs, so the pasta abstraction still includes passt's one. I plan to push the adaptation required for the Debian package in commit 5bb812e79143 ("debian/rules: Override pasta symbolic links with hard links"), on Salsa. If other distributions need to support AppArmor profiles they can follow a similar approach. The profile itself will be installed, there, via dh_apparmor, in a separate commit, b52557fedcb1 ("debian/rules: Install new pasta profile using dh_apparmor"). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
28 lines
676 B
Plaintext
28 lines
676 B
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/usr.bin.passt - AppArmor profile for passt(1)
|
|
#
|
|
# Copyright (c) 2022 Red Hat GmbH
|
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
profile passt /usr/bin/passt{,.avx2} {
|
|
include <abstractions/passt>
|
|
|
|
# Alternatively: include <abstractions/user-tmp>
|
|
owner /tmp/** w, # tap_sock_unix_init(), pcap(),
|
|
# write_pidfile(),
|
|
# logfile_init()
|
|
|
|
owner @{HOME}/** w, # pcap(), write_pidfile()
|
|
}
|