apparmor.d/apparmor.d/profiles-a-f/f3fix
Jeroen Rijken 40b171ee94 Replace shells with new sh_path variable
Signed-off-by: Jeroen Rijken <jeroen.rijken@xs4all.nl>
2024-02-21 13:56:40 +00:00

64 lines
1.4 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/f3fix
profile f3fix @{exec_path} {
include <abstractions/base>
include <abstractions/disks-write>
# To remove the following errors:
# Error: Partition(s) * on /dev/sdb have been written, but we have been unable to inform the
# kernel of the change, probably because it/they are in use. As a result, the old partition(s)
# will remain in use. You should reboot now before making further changes.
capability sys_admin,
# Needed? (##FIXME##)
capability sys_rawio,
# Needed?
ptrace (read),
@{exec_path} mr,
@{sh_path} rix,
@{bin}/dmidecode rPx,
@{bin}/udevadm rCx -> udevadm,
owner @{PROC}/@{pid}/mounts r,
@{PROC}/swaps r,
profile udevadm {
include <abstractions/base>
ptrace (read),
@{bin}/udevadm mr,
/etc/udev/udev.conf r,
owner @{PROC}/@{pid}/stat r,
owner @{PROC}/@{pid}/cgroup r,
@{PROC}/cmdline r,
@{PROC}/1/sched r,
@{PROC}/1/environ r,
@{PROC}/sys/kernel/osrelease r,
@{PROC}/sys/kernel/random/boot_id r,
@{sys}/firmware/efi/efivars/SecureBoot-@{uuid} r,
# file_inherit
/dev/sd[a-z]* rw,
}
include if exists <local/f3fix>
}