apparmor.d/apparmor.d/profiles-a-f/fsck

43 lines
949 B
Text
Raw Normal View History

# apparmor.d - Full set of apparmor profiles
2022-05-07 12:42:18 +02:00
# Copyright (C) 2020-2022 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
@{exec_path} = @{bin}/fsck
profile fsck @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
include <abstractions/disks-read>
2021-05-16 22:11:55 +02:00
capability dac_override,
capability dac_read_search,
2022-05-07 12:42:18 +02:00
capability sys_rawio,
2021-05-16 22:11:55 +02:00
@{exec_path} mr,
@{bin}/e2fsck rPx,
@{bin}/fsck.* rPx,
/etc/fstab r,
# When a mount dir is passed to fsck as an argument.
2024-02-28 18:17:20 +01:00
@{HOME}/ r,
@{MOUNTS}/ r,
/boot/ r,
2022-05-07 12:42:18 +02:00
@{run}/mount/utab r,
@{run}/systemd/fsck.progress rw,
2024-02-28 18:17:20 +01:00
owner @{run}/blkid/blkid.tab.old rwl -> @{run}/blkid/blkid.tab,
owner @{run}/blkid/blkid.tab{,-@{rand6}} rw,
owner @{run}/fsck/ rw,
owner @{run}/fsck/*.lock rwk,
2022-05-07 12:42:18 +02:00
@{PROC}/@{pids}/mountinfo r,
@{PROC}/partitions r,
2020-12-10 22:33:39 +01:00
include if exists <local/fsck>
}