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

43 lines
966 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-2022 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} = /{usr/,}{s,}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,
/{usr/,}{s,}bin/e2fsck rPx,
/{usr/,}{s,}bin/fsck.* rPx,
/etc/fstab r,
# When a mount dir is passed to fsck as an argument.
@{MOUNTS}/ r,
/boot/ r,
/home/ r,
2022-05-07 12:42:18 +02:00
owner @{run}/fsck/ rw,
owner @{run}/fsck/*.lock rwk,
2020-10-25 10:23:34 +01:00
owner @{run}/blkid/blkid.tab{,-*} rw,
owner @{run}/blkid/blkid.tab.old rwl -> @{run}/blkid/blkid.tab,
2022-05-07 12:42:18 +02:00
@{run}/mount/utab r,
2022-05-15 23:56:42 +02:00
@{run}/systemd/fsck.progress w,
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>
}