apparmor.d/apparmor.d/groups/network/nmcli
Alexandre Pujol 4e5f4cb06a
feat: profiles and integration tests improvments.
Add the udbus variable to be used in `unix bind` rule for dbus.
2024-11-19 19:04:27 +00:00

36 lines
914 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/nmcli
profile nmcli @{exec_path} {
include <abstractions/base>
include <abstractions/bus-system>
include <abstractions/consoles>
capability dac_read_search,
capability sys_nice,
#aa:dbus talk bus=system name=org.freedesktop.NetworkManager label=NetworkManager
@{exec_path} mr,
@{pager_path} rPx -> child-pager,
owner @{HOME}/.nm-vpngate/*.ovpn r,
owner @{HOME}/.cert/nm-openvpn/*.pem rw,
@{run}/udev/data/+pci:* r, # Identifies all PCI devices (CPU, GPU, Network, Disks, USB, etc.)
@{run}/udev/data/n@{int} r,
@{sys}/devices/virtual/net/{,**} r,
@{sys}/devices/@{pci}/net/*/{,**} r,
include if exists <local/nmcli>
}
# vim:syntax=apparmor