apparmor.d/apparmor.d/groups/procps/sysctl
2025-03-30 16:27:41 +02:00

39 lines
814 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# TODO: Rethink this profile. Should not be called by another profile.
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/sysctl
profile sysctl @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
capability net_admin,
capability sys_admin,
capability sys_ptrace,
capability sys_resource,
@{exec_path} mr,
/etc/sysctl.conf r,
/etc/sysctl.d/{,**} r,
/usr/lib/sysctl.d/{,**} r,
/etc/ufw/sysctl.conf r, # Add support for ufw
@{PROC}/sys/ r,
@{PROC}/sys/** rw,
# Inherit Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/sysctl>
}
# vim:syntax=apparmor