feat(profiles): update dhcpcd.

This commit is contained in:
Alexandre Pujol 2023-07-09 15:13:59 +01:00
parent 1f75dc9956
commit dab27a492d
Failed to generate hash of commit

View file

@ -1,4 +1,7 @@
# Last Modified: Sun Feb 19 16:26:38 2023
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@ -27,39 +30,46 @@ profile dhcpcd @{exec_path} flags=(attach_disconnected) {
@{exec_path} mr,
@{bin}/{,ba,da}sh rix,
@{bin}/cat rix,
@{bin}/chmod rix,
@{bin}/cmp rix,
@{bin}/mkdir rix,
@{bin}/rm rix,
@{bin}/sed rix,
@{lib}/dhcpcd/dhcpcd-run-hooks rix,
/dev/tty rw,
@{bin}/{,ba,da}sh rix,
@{bin}/cat rix,
@{bin}/chmod rix,
@{bin}/cmp rix,
@{bin}/mkdir rix,
@{bin}/rm rix,
@{bin}/sed rix,
@{lib}/dhcpcd/dhcpcd-run-hooks rix,
/var/lib/dhcpcd/*.lease{,6} rw,
/var/lib/dhcpcd/secret rw,
@{PROC}/@{pid}/net/if_inet6 r,
@{PROC}/@{pid}/stat r,
@{PROC}/sys/kernel/hostname r,
@{PROC}/sys/net/ipv{4,6}/conf/** r,
@{PROC}/sys/net/ipv{4,6}/conf/*/accept_ra rw,
@{PROC}/sys/net/ipv{4,6}/conf/*/hop_limit w,
@{PROC}/sys/net/ipv{4,6}/neigh/*/{base_reachable_time_ms,retrans_time_ms} w,
@{etc_ro}/dhcpcd.conf r,
@{etc_rw}/resolv.conf rw,
/etc/dhcpcd.conf r,
/etc/resolv.conf rw,
@{run}/dhcpcd/{.pid,pid} rwk,
@{run}/dhcpcd/{.sock,sock} w,
@{run}/dhcpcd/*.pid wk,
@{run}/dhcpcd/*.sock w,
@{run}/dhcpcd/hook-state/ rw,
@{run}/dhcpcd/hook-state/resolv.conf.*.{dhcp,link} rw,
@{run}/dhcpcd/hook-state/resolv.conf/ rw,
@{run}/dhcpcd/{.pid,pid} rwk,
@{run}/dhcpcd/{.sock,sock} w,
@{run}/dhcpcd/unpriv.sock w,
@{run}/udev/data/n[0-9]* r,
@{sys}/devices/pci[0-9]*/**/uevent r,
@{sys}/devices/virtual/dmi/id/product_uuid r,
@{sys}/devices/virtual/net/**/{tun_flags,uevent} r,
@{PROC}/sys/kernel/hostname r,
@{PROC}/sys/net/ipv{4,6}/conf/** r,
@{PROC}/sys/net/ipv{4,6}/conf/*/accept_ra rw,
@{PROC}/sys/net/ipv{4,6}/conf/*/hop_limit w,
@{PROC}/sys/net/ipv{4,6}/neigh/*/{base_reachable_time_ms,retrans_time_ms} w,
owner @{PROC}/@{pid}/net/if_inet6 r,
owner @{PROC}/@{pid}/stat r,
/dev/tty rw,
include if exists <local/dhcpcd>
}