mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-14 23:43:56 +01:00
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}bin/networkctl
|
|
profile networkctl @{exec_path} flags=(complain) {
|
|
include <abstractions/base>
|
|
|
|
# To be able to manage network interfaces,
|
|
capability net_admin,
|
|
|
|
# Needed? (#FIXME#)
|
|
audit deny capability sys_resource,
|
|
audit deny capability sys_module,
|
|
|
|
signal send peer=child-pager,
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
network netlink raw,
|
|
|
|
@{exec_path} mr,
|
|
|
|
/{usr/,}bin/pager rPx -> child-pager,
|
|
/{usr/,}bin/less rPx -> child-pager,
|
|
/{usr/,}bin/more rPx -> child-pager,
|
|
|
|
@{sys}/devices/**/net/**/uevent r,
|
|
|
|
@{run}/systemd/netif/links/[0-9]* r,
|
|
@{run}/systemd/netif/state r,
|
|
|
|
owner @{PROC}/@{pid}/cgroup r,
|
|
owner @{PROC}/@{pid}/stat r,
|
|
@{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
/etc/udev/hwdb.bin r,
|
|
|
|
# To be able to read logs
|
|
@{run}/log/ r,
|
|
/{run,var}/log/journal/ r,
|
|
/{run,var}/log/journal/[0-9a-f]*/ r,
|
|
/{run,var}/log/journal/[0-9a-f]*/user-[0-9a-f]*.journal* r,
|
|
/{run,var}/log/journal/[0-9a-f]*/system.journal* r,
|
|
/{run,var}/log/journal/[0-9a-f]*/system@[0-9a-f]*.journal* r,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
include if exists <local/networkctld>
|
|
}
|