2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
2022-06-25 01:18:26 +02:00
|
|
|
# Copyright (C) 2019-2022 Mikhail Morfikov
|
2024-02-07 00:16:21 +01:00
|
|
|
# Copyright (C) 2022-2024 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
|
|
|
|
2024-02-23 21:12:32 +01:00
|
|
|
@{exec_path} = @{bin}/e2fsck @{bin}/fsck.ext2 @{bin}/fsck.ext3 @{bin}/fsck.ext4
|
2020-09-12 17:19:23 +02:00
|
|
|
profile e2fsck @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/disks-write>
|
|
|
|
include <abstractions/user-download-strict>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2022-06-25 01:18:26 +02:00
|
|
|
capability dac_read_search,
|
|
|
|
capability sys_rawio,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
# To check for badblocks
|
2024-02-11 15:34:46 +01:00
|
|
|
@{sh_path} rix,
|
2023-07-09 15:23:22 +02:00
|
|
|
@{bin}/badblocks rPx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2022-06-25 01:18:26 +02:00
|
|
|
/usr/share/file/misc/magic.mgc r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# A place for file images
|
2023-02-08 00:15:18 +01:00
|
|
|
owner @{user_img_dirs}/{,**} rwk,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2022-06-25 01:18:26 +02:00
|
|
|
@{run}/blkid/ rw,
|
2023-03-07 18:57:57 +01:00
|
|
|
@{run}/systemd/fsck.progress rw,
|
2022-06-25 01:18:26 +02:00
|
|
|
owner @{run}/blkid/blkid.tab.old rwl -> @{run}/blkid/blkid.tab,
|
2023-08-17 21:01:53 +02:00
|
|
|
owner @{run}/blkid/blkid.tab{,-@{rand6}} rw,
|
2022-06-25 01:18:26 +02:00
|
|
|
|
|
|
|
@{sys}/devices/**/power_supply/AC/online r,
|
|
|
|
|
|
|
|
@{PROC}/swaps r,
|
|
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/e2fsck>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|
2024-06-15 16:13:21 +02:00
|
|
|
|
|
|
|
# vim:syntax=apparmor
|