feat(profile): add profile for most of udev internat scripts
Required by FSP.
This commit is contained in:
parent
379a093b10
commit
c008cbda67
8 changed files with 150 additions and 1 deletions
23
apparmor.d/profiles-s-z/udev-ata_id
Normal file
23
apparmor.d/profiles-s-z/udev-ata_id
Normal 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
|
||||
23
apparmor.d/profiles-s-z/udev-bcache-export-cached
Normal file
23
apparmor.d/profiles-s-z/udev-bcache-export-cached
Normal 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
|
||||
24
apparmor.d/profiles-s-z/udev-cdrom_id
Normal file
24
apparmor.d/profiles-s-z/udev-cdrom_id
Normal 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
|
||||
24
apparmor.d/profiles-s-z/udev-fido_id
Normal file
24
apparmor.d/profiles-s-z/udev-fido_id
Normal 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
|
||||
28
apparmor.d/profiles-s-z/udev-hdparm
Normal file
28
apparmor.d/profiles-s-z/udev-hdparm
Normal 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
|
||||
21
apparmor.d/profiles-s-z/udev-probe-bcache
Normal file
21
apparmor.d/profiles-s-z/udev-probe-bcache
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue