fix: ensure fsck.ext4 is has only one profile.

fsck.ext4 was in the profile attachment for both fsck-ext4 and e2fsck, breaking transition to the profile.

Also reorganise some entrypoint to avoid this kind of confusion.
This commit is contained in:
Alexandre Pujol 2024-02-23 20:12:32 +00:00
parent a9e767462d
commit 4b23bccb47
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
5 changed files with 7 additions and 27 deletions

View File

@ -7,7 +7,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/{e2fsck,fsck.ext2,fsck.ext3,fsck.ext4}
@{exec_path} = @{bin}/e2fsck @{bin}/fsck.ext2 @{bin}/fsck.ext3 @{bin}/fsck.ext4
profile e2fsck @{exec_path} {
include <abstractions/base>
include <abstractions/disks-write>

View File

@ -1,20 +0,0 @@
# apparmor.d - Full set of apparmor profiles
# 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}/fsck.ext4
profile fsck-ext4 @{exec_path} {
include <abstractions/base>
@{exec_path} rm,
@{sh_path} rix,
/etc/fstab r,
include if exists <local/fsck-ext4>
}

View File

@ -8,7 +8,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/fsck.btrfs
profile fsck-btrfs @{exec_path} {
profile fsck.btrfs @{exec_path} {
include <abstractions/base>
@{exec_path} r,
@ -17,5 +17,5 @@ profile fsck-btrfs @{exec_path} {
/etc/fstab r,
include if exists <local/fsck-btrfs>
include if exists <local/fsck.btrfs>
}

View File

@ -7,8 +7,8 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/{fsck.fat,fsck.msdos,fsck.vfat,dosfsck}
profile fsck-fat @{exec_path} {
@{exec_path} = @{bin}/fsck.fat @{bin}/fsck.msdos @{bin}/fsck.vfat @{bin}/dosfsck
profile fsck.fat @{exec_path} {
include <abstractions/base>
include <abstractions/disks-write>
include <abstractions/user-download-strict>
@ -20,5 +20,5 @@ profile fsck-fat @{exec_path} {
owner @{run}/systemd/fsck.progress rw,
include if exists <local/fsck-fat>
include if exists <local/fsck.fat>
}

View File

@ -7,7 +7,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/{mke2fs,mkfs.ext2,mkfs.ext3,mkfs.ext4}
@{exec_path} = @{bin}/mke2fs @{bin}/mkfs.ext2 @{bin}/mkfs.ext3 @{bin}/mkfs.ext4
profile mke2fs @{exec_path} {
include <abstractions/base>
include <abstractions/disks-write>