60 lines
1.3 KiB
Text
60 lines
1.3 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2022 Mikhail Morfikov
|
|
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{sbin}/update-initramfs
|
|
profile update-initramfs @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
ptrace (read) peer=unconfined,
|
|
|
|
@{exec_path} rix,
|
|
@{sh_path} rix,
|
|
|
|
@{bin}/ r,
|
|
|
|
@{bin}/cat rix,
|
|
@{bin}/{m,g,}awk rix,
|
|
@{bin}/getopt rix,
|
|
@{bin}/ln rix,
|
|
@{bin}/mv rix,
|
|
@{bin}/rm rix,
|
|
@{bin}/sha1sum rix,
|
|
@{bin}/sync rix,
|
|
@{bin}/uname rix,
|
|
@{bin}/run-parts rix,
|
|
|
|
@{bin}/dpkg-trigger rPx,
|
|
@{bin}/ischroot rPx,
|
|
@{bin}/linux-version rPx,
|
|
@{sbin}/mkinitramfs rPx,
|
|
|
|
/etc/initramfs/post-update.d/* rPUx,
|
|
|
|
/var/lib/initramfs-tools/* w,
|
|
|
|
# For shell pwd
|
|
/ r,
|
|
/etc/ r,
|
|
/root/ r,
|
|
|
|
/etc/initramfs-tools/update-initramfs.conf r,
|
|
|
|
@{PROC}/1/mountinfo r,
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
owner @{efi}/ r,
|
|
owner @{efi}/initrd.img-* rw,
|
|
owner @{efi}/initrd.img-*.dpkg-bak rwl -> @{efi}/initrd.img-*,
|
|
|
|
include if exists <local/update-initramfs>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|