2021-04-01 17:17:47 +02:00
|
|
|
# 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>
|
2021-04-01 17:17:47 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2021-04-02 00:15:47 +02:00
|
|
|
@{exec_path} = /{usr/,}{s,}bin/fsck
|
2020-09-12 17:19:23 +02:00
|
|
|
profile fsck @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/disks-read>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
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
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
@{exec_path} mr,
|
|
|
|
|
2021-04-02 00:15:47 +02:00
|
|
|
/{usr/,}{s,}bin/e2fsck rPx,
|
|
|
|
/{usr/,}{s,}bin/fsck.* rPx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/etc/fstab r,
|
|
|
|
|
|
|
|
# When a mount dir is passed to fsck as an argument.
|
2022-06-12 23:51:37 +02:00
|
|
|
@{MOUNTS}/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/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-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/fsck>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|