apparmor.d/apparmor.d/groups/grub/grub-mkconfig
2023-09-01 19:26:52 +01:00

87 lines
2.4 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Jeroen Rijken
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/grub-mkconfig
profile grub-mkconfig @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
capability dac_override,
capability dac_read_search,
@{exec_path} mr,
/{usr/,}{local/,}{s,}bin/zfs rPx,
/{usr/,}{local/,}{s,}bin/zpool rPx,
@{bin}/dmsetup rPUx,
@{bin}/grub-probe rPx,
@{bin}/{,ba,da}sh rix,
@{bin}/{e,f,}grep rix,
@{bin}/{m,g,}awk rix,
@{bin}/basename rix,
@{bin}/btrfs rPx,
@{bin}/cat rix,
@{bin}/chmod rix,
@{bin}/cut rix,
@{bin}/date rix,
@{bin}/dirname rix,
@{bin}/dpkg rPx,
@{bin}/find rix,
@{bin}/findmnt rPx,
@{bin}/gettext rix,
@{bin}/grub-mkrelpath rPx,
@{bin}/grub-script-check rPx,
@{bin}/head rix,
@{bin}/id rPx,
@{bin}/ls rix,
@{bin}/lsb_release rPx -> lsb_release,
@{bin}/mktemp rix,
@{bin}/mount rPx,
@{bin}/mountpoint rix,
@{bin}/os-prober rPx,
@{bin}/paste rix,
@{bin}/readlink rix,
@{bin}/rm rix,
@{bin}/rmdir rix,
@{bin}/sed rix,
@{bin}/sort rix,
@{bin}/stat rix,
@{bin}/tail rix,
@{bin}/tr rix,
@{bin}/umount rPx,
@{bin}/uname rix,
@{bin}/which{.debianutils,} rix,
/etc/grub.d/{**,} rix,
/boot/{**,} r,
/boot/grub/{**,} rw,
/etc/default/grub r,
/etc/default/grub-btrfs/config r,
/etc/default/grub.d/{*,} r,
/usr/share/grub/{**,} r,
/usr/share/terminfo/x/xterm-256color r,
/.zfs/snapshot/*/boot/ r,
/.zfs/snapshot/*/etc/{machine-id,} r,
/.zfs/snapshot/*/etc/fstab r,
/.zfs/snapshot/*/{usr/,}lib/os-release r,
/ r,
owner /tmp/** rw,
@{PROC}/@{pids}/mountinfo r,
@{PROC}/@{pids}/mounts r,
@{sys}/firmware/efi/efivars/OsIndicationsSupported-@{uuid} r,
include if exists <local/grub-mkconfig>
}