apparmor.d/apparmor.d/profiles-g-l/ip
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

50 lines
1.1 KiB
Plaintext

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/ip
profile ip @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
capability bpf,
capability net_admin,
capability sys_admin,
capability sys_module,
network netlink raw,
mount options=(rw, rshared) -> /{var/,}run/netns/,
mount options=(rw, rslave) -> /,
mount options=(rw, bind) / -> /{var/,}run/netns/*,
mount options=(rw, bind) /etc/netns/firefox/resolv.conf -> /etc/resolv.conf,
mount fstype=sysfs -> /sys/,
umount @{run}/netns/*,
umount /sys/,
@{exec_path} mrix,
/ r,
/etc/iproute2/{,**} r,
/etc/netns/*/ r,
owner @{run}/netns/ rw,
@{run}/netns/* rw,
owner @{PROC}/@{pid}/cgroup r,
owner @{PROC}/@{pid}/net/dev_mcast r,
owner @{PROC}/@{pid}/net/igmp{,6} r,
owner @{PROC}/sys/net/ipv{4,6}/route/flush w,
/dev/tty@{int} rw,
include if exists <local/ip>
}