feat(profiles): general update.

This commit is contained in:
Alexandre Pujol 2023-09-15 22:01:08 +01:00
parent 1d68b5bbc4
commit 6a78b17d23
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
22 changed files with 62 additions and 35 deletions

View file

@ -1,14 +1,13 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/{kmod,lsmod}
@{exec_path} += @{bin}/{depmod,insmod,lsmod,rmmod,modinfo,modprobe}
@{exec_path} = @{bin}/{kmod,lsmod,depmod,insmod,rmmod,modinfo,modprobe}
profile kmod @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/consoles>
@ -24,8 +23,6 @@ profile kmod @{exec_path} flags=(attach_disconnected) {
network inet raw,
unix (receive) type=stream,
@{exec_path} mrix,
@{bin}/{,ba,da}sh rix,
@ -73,8 +70,9 @@ profile kmod @{exec_path} flags=(attach_disconnected) {
/dev/tty@{int} rw,
deny /apparmor/.null rw,
deny @{user_share_dirs}/gvfs-metadata/* r,
deny /apparmor/.null rw,
deny unix (receive) type=stream,
include if exists <local/kmod>
}