Add vim modeline instructing the editor to use syntax plugin provided by apparmor. Continuation of #394 to keep the diff list relatively short.
134 lines
3.3 KiB
Text
134 lines
3.3 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
# TODO: rethink how the scripts should be managed
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{lib}/{,NetworkManager/}nm-dispatcher
|
|
profile nm-dispatcher @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/bus-system>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/python>
|
|
|
|
capability net_admin,
|
|
capability sys_nice,
|
|
capability sys_ptrace,
|
|
|
|
ptrace (read) peer=@{p_systemd},
|
|
|
|
#aa:dbus own bus=system name=org.freedesktop.nm_dispatcher
|
|
|
|
dbus send bus=system path=/org/freedesktop
|
|
interface=org.freedesktop.DBus.ObjectManager
|
|
member=GetManagedObjects
|
|
peer=(name=:*, label=NetworkManager),
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/python3.@{int} rix,
|
|
@{bin}/basename rix,
|
|
@{bin}/cat rix,
|
|
@{bin}/chronyc rPUx,
|
|
@{bin}/chown rix,
|
|
@{bin}/date rix,
|
|
@{bin}/gawk rix,
|
|
@{bin}/grep rix,
|
|
@{bin}/id rix,
|
|
@{bin}/invoke-rc.d rCx -> invoke-rc,
|
|
@{bin}/mkdir rix,
|
|
@{bin}/mktemp rix,
|
|
@{bin}/netconfig rPUx,
|
|
@{bin}/nmcli rix,
|
|
@{bin}/readlink rix,
|
|
@{bin}/rm rix,
|
|
@{bin}/run-parts rCx -> run-parts,
|
|
@{bin}/sed rix,
|
|
@{bin}/systemctl rCx -> systemctl,
|
|
@{bin}/systemd-cat rPx,
|
|
@{bin}/tr rix,
|
|
/usr/share/tlp/tlp-readconfs rPUx,
|
|
|
|
@{lib}/NetworkManager/dispatcher.d/ r,
|
|
@{lib}/NetworkManager/dispatcher.d/** rix,
|
|
/etc/NetworkManager/dispatcher.d/ r,
|
|
/etc/NetworkManager/dispatcher.d/** rix,
|
|
/etc/dhcp/dhclient-exit-hooks.d/ntp r,
|
|
|
|
/usr/share/tlp/{,**} rw,
|
|
|
|
/etc/fstab r,
|
|
/etc/ntp.conf r,
|
|
/etc/sysconfig/network/config r,
|
|
|
|
/ r,
|
|
|
|
@{run}/chrony-dhcp/ rw,
|
|
@{run}/ntp.conf.dhcp rw,
|
|
@{run}/systemd/netif/leases/ r,
|
|
@{run}/systemd/notify rw,
|
|
@{run}/tlp/{,*} rw,
|
|
owner @{run}/ntp.conf.dhcp.@{rand6} rw,
|
|
|
|
@{sys}/class/net/ r,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
/dev/tty rw,
|
|
|
|
@{run}/modem-manager-gui/{,timestamps} rw,
|
|
|
|
profile systemctl {
|
|
include <abstractions/base>
|
|
include <abstractions/app/systemctl>
|
|
|
|
capability net_admin,
|
|
|
|
@{etc_ro}/ r,
|
|
@{etc_ro}/systemd/ r,
|
|
@{etc_ro}/systemd/system/ r,
|
|
@{etc_ro}/systemd/system/ntp.service r,
|
|
|
|
include if exists <local/nm-dispatcher_systemctl>
|
|
}
|
|
|
|
profile invoke-rc {
|
|
include <abstractions/base>
|
|
|
|
@{bin}/invoke-rc.d rm,
|
|
@{sh_path} rix,
|
|
@{bin}/basename rix,
|
|
@{bin}/ls rix,
|
|
# This doesn't seem to work, profile transition not found.
|
|
@{bin}/systemctl rCx -> systemctl,
|
|
|
|
/ r,
|
|
|
|
/etc/ r,
|
|
@{etc_ro}/rc{[0-9],S}.d/{,*} r,
|
|
@{etc_ro}/init.d/ntp r,
|
|
|
|
include if exists <local/nm-dispatcher_invoke-rc>
|
|
}
|
|
|
|
profile run-parts {
|
|
include <abstractions/base>
|
|
|
|
/{usr/,}bin/run-parts mr,
|
|
|
|
/etc/network/if-*.d/ r,
|
|
/etc/network/if-*.d/* rPUx,
|
|
/etc/wpa_supplicant/ifupdown.sh rPUx,
|
|
|
|
include if exists <local/nm-dispatcher_run-parts>
|
|
}
|
|
|
|
include if exists <local/nm-dispatcher>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|