apparmor.d/apparmor.d/groups/virt/virtsecretd
Alexandre Pujol 275d6b6e62
feat(profiles): replace old [0-9]* glob by @{int}
Beware some [0-9]* glob are actually not proper @{int}.
2023-08-18 17:09:53 +01:00

38 lines
No EOL
1,015 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/virtsecretd
profile virtsecretd @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
network netlink raw,
ptrace (read) peer=virtqemud,
@{exec_path} mr,
owner @{user_config_dirs}/libvirt/secrets/ rw,
owner @{user_config_dirs}/libvirt/secrets/run/{,*} rwk,
@{run}/systemd/inhibit/*.ref rw,
owner @{run}/user/@{uid}/libvirt/common/system.token rwk,
owner @{run}/user/@{uid}/libvirt/secrets/ rw,
owner @{run}/user/@{uid}/libvirt/secrets/run/{,*} rwk,
owner @{run}/user/@{uid}/libvirt/virtsecretd* rwk,
@{run}/utmp rk,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node@{int}/meminfo r,
owner @{PROC}/@{pids}/stat r,
include if exists <local/virtsecretd>
}