feat(profile): include more rule from #94.

This commit is contained in:
Alexandre Pujol 2023-01-14 13:00:01 +00:00
parent 7c4c48f4c3
commit 2431ba98aa
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
27 changed files with 119 additions and 8 deletions

View file

@ -25,6 +25,7 @@ profile grub-mkconfig @{exec_path} {
/{usr/,}bin/{e,f,}grep rix,
/{usr/,}bin/{m,g,}awk rix,
/{usr/,}bin/basename rix,
/{usr/,}bin/btrfs rPx,
/{usr/,}bin/cat rix,
/{usr/,}bin/chmod rix,
/{usr/,}bin/cut rix,
@ -62,6 +63,7 @@ profile grub-mkconfig @{exec_path} {
/boot/grub/{**,} rw,
/etc/default/grub r,
/etc/default/grub-btrfs/config r,
/etc/default/grub.d/{*,} r,
/usr/share/grub/{**,} r,

View file

@ -1,5 +1,6 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Jeroen Rijken
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
@ -11,9 +12,15 @@ profile grub-mkrelpath @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
capability sys_admin,
@{exec_path} mr,
/{usr/,}{local/,}{s,}bin/zpool rPx,
/ r,
/usr/share/grub/* r,
@{PROC}/@{pids}/mountinfo r,
include if exists <local/grub-mkrelpath>

View file

@ -1,5 +1,6 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Jeroen Rijken
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
@ -10,9 +11,16 @@ include <tunables/global>
profile grub-mount @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/disks-read>
capability sys_admin,
@{exec_path} mr,
/ r,
/var/lib/os-prober/mount/ r,
/dev/fuse rw,
include if exists <local/grub-mount>
}

View file

@ -23,6 +23,7 @@ profile grub-probe @{exec_path} {
/{usr/,}bin/udevadm rPx,
/ r,
/usr/share/grub/* r,
@{PROC}/@{pids}/mountinfo r,
@{PROC}/devices r,

View file

@ -13,7 +13,7 @@ profile grub-script-check @{exec_path} {
@{exec_path} mr,
/boot/grub/grub.cfg{.new,} rw,
/boot/grub/grub* rw,
include if exists <local/grub-script-check>
}