2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}lib/systemd/systemd-networkd
|
|
|
|
profile systemd-networkd @{exec_path} flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/systemd-common>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
capability net_admin,
|
|
|
|
capability net_raw,
|
|
|
|
capability net_bind_service,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/etc/systemd/networkd.conf r,
|
|
|
|
/etc/systemd/network/ r,
|
|
|
|
/etc/systemd/network/[0-9][0-9]-*.{netdev,network,link} r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
owner @{run}/systemd/netif/links/.#* rw,
|
|
|
|
owner @{run}/systemd/netif/links/[0-9]* rw,
|
|
|
|
owner @{run}/systemd/netif/leases/[0-9]* rw,
|
|
|
|
owner @{run}/systemd/netif/leases/.#* rw,
|
|
|
|
owner @{run}/systemd/netif/.#state* rw,
|
|
|
|
owner @{run}/systemd/netif/.#state rw,
|
|
|
|
owner @{run}/systemd/netif/state rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# To be able to configure network interfaces
|
|
|
|
@{PROC}/sys/net/ipv{4,6}/** rw,
|
|
|
|
|
|
|
|
@{sys}/devices/virtual/dmi/id/product_name r,
|
|
|
|
@{sys}/devices/virtual/dmi/id/{sys,board,bios}_vendor r,
|
|
|
|
|
|
|
|
@{sys}/devices/**/net/** r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/data/n[0-9]* r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
/etc/machine-id r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/systemd-networkd>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|