feat(profile): add profile for most of udev internat scripts

Required by FSP.
This commit is contained in:
Alexandre Pujol 2025-04-13 18:43:57 +02:00 committed by Alex
parent 379a093b10
commit c008cbda67
8 changed files with 150 additions and 1 deletions

View file

@ -0,0 +1,23 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/ata_id
profile udev-ata_id @{exec_path} {
include <abstractions/base>
include <abstractions/disks-read>
capability sys_rawio,
@{exec_path} mr,
/etc/udev/udev.conf r,
include if exists <local/udev-ata_id>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,23 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/bcache-export-cached
profile udev-bcache-export-cached @{exec_path} {
include <abstractions/base>
include <abstractions/disks-read>
@{exec_path} mr,
@{sh_path} rix,
@{bin}/{m,g,}awk rix,
@{bin}/bcache-super-show rix,
include if exists <local/udev-bcache-export-cached>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/cdrom_id
profile udev-cdrom_id @{exec_path} {
include <abstractions/base>
capability sys_rawio,
@{exec_path} mr,
/etc/udev/udev.conf r,
/dev/sr@{int} r,
include if exists <local/udev-cdrom_id>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/fido_id
profile udev-fido_id @{exec_path} {
include <abstractions/base>
include <abstractions/devices-usb-read>
@{exec_path} mr,
/etc/udev/udev.conf r,
@{sys}/devices/@{pci}/report_descriptor r,
@{sys}/devices/virtual/**/report_descriptor r,
include if exists <local/udev-fido_id>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,28 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/hdparm
profile udev-hdparm @{exec_path} {
include <abstractions/base>
@{exec_path} mr,
@{sh_path} rix,
@{bin}/{,e}grep rix,
@{bin}/sed rix,
@{bin}/udevadm rPx,
/etc/hdparm.conf r,
@{PROC}/cmdline r,
@{PROC}/mdstat r,
include if exists <local/udev-hdparm>
}
# vim:syntax=apparmor

View file

@ -0,0 +1,21 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/udev/probe-bcache
profile udev-probe-bcache @{exec_path} {
include <abstractions/base>
include <abstractions/disks-read>
capability sys_rawio,
@{exec_path} mr,
include if exists <local/udev-probe-bcache>
}
# vim:syntax=apparmor