Add sysctl profile.

This commit is contained in:
Alexandre Pujol 2021-12-12 12:36:17 +00:00
parent bcd1b0958d
commit 16dddf16dc
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/sysctl
profile sysctl @{exec_path} {
include <abstractions/base>
capability mac_admin,
capability net_admin,
capability sys_admin,
capability sys_resource,
@{exec_path} mr,
@{PROC}/sys/ r,
@{PROC}/sys/** rw,
# Inherit Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/sysctl>
}

View File

@ -114,6 +114,7 @@ sudo complain
swaplabel complain swaplabel complain
swapoff complain swapoff complain
swapon complain swapon complain
sysctl complain
systemd-analyze complain systemd-analyze complain
systemd-ask-password complain systemd-ask-password complain
systemd-binfmt complain systemd-binfmt complain