feat(profile): add ufw-init.

This commit is contained in:
Alexandre Pujol 2025-03-30 17:12:25 +02:00
parent ee52841833
commit 5975c7f250
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -0,0 +1,38 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/ufw/ufw-init
profile ufw-init @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
capability net_admin,
network inet dgram,
network inet raw,
network inet6 dgram,
network inet6 raw,
network netlink raw,
@{exec_path} mr,
@{sh_path} rix,
@{bin}/sysctl rix,
@{bin}/xtables-legacy-multi rix,
@{bin}/xtables-nft-multi rix,
/etc/default/ufw r,
/etc/ufw/* r,
@{PROC}/@{pid}/net/ip_tables_names r,
@{PROC}/sys/net/ipv{4,6}/** rw,
include if exists <local/ufw-init>
}
# vim:syntax=apparmor