feat(profile): use the @{pci} varibale when possible.

This commit is contained in:
Alexandre Pujol 2023-12-08 17:46:05 +00:00
parent 013f1c5a83
commit bb947318a5
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
83 changed files with 168 additions and 170 deletions

View file

@ -76,7 +76,7 @@ profile gparted @{exec_path} {
@{sys}/** r,
@{sys}/devices/virtual/block/**/uevent rw,
@{sys}/devices/pci[0-9]*/**/block/**/uevent rw,
@{sys}/devices/@{pci}/block/**/uevent rw,
@{run}/udev/data/* r,
}

View file

@ -102,10 +102,10 @@ profile gpartedbin @{exec_path} {
@{bin}/mount mr,
@{sys}/devices/pci[0-9]*/**/block/{s,v}d[a-z]/ r,
@{sys}/devices/pci[0-9]*/**/block/{s,v}d[a-z]/dev r,
@{sys}/devices/pci[0-9]*/**/block/{s,v}d[a-z]/{s,v}d[a-z][0-9]*/ r,
@{sys}/devices/pci[0-9]*/**/block/{s,v}d[a-z]/{s,v}d[a-z][0-9]*/{start,size} r,
@{sys}/devices/@{pci}/block/{s,v}d[a-z]/ r,
@{sys}/devices/@{pci}/block/{s,v}d[a-z]/dev r,
@{sys}/devices/@{pci}/block/{s,v}d[a-z]/{s,v}d[a-z][0-9]*/ r,
@{sys}/devices/@{pci}/block/{s,v}d[a-z]/{s,v}d[a-z][0-9]*/{start,size} r,
/dev/{s,v}d[a-z]* r,
/dev/{s,v}d[a-z]*[0-9]* r,

View file

@ -53,7 +53,7 @@ profile gzdoom @{exec_path} {
/etc/machine-id r,
/var/lib/dbus/machine-id r,
@{sys}/devices/pci[0-9]*/**/usb[0-9]/**/uevent r,
@{sys}/devices/@{pci}/usb@{int}/**/uevent r,
owner @{HOME}/ r,
owner @{user_config_dirs}/gzdoom/ rw,

View file

@ -74,8 +74,8 @@ profile hardinfo @{exec_path} {
@{sys}/devices/virtual/thermal/thermal_zone[0-9]/temp* r,
@{sys}/devices/platform/**/hwmon/hwmon@{int}/temp* r,
@{sys}/devices/platform/**/hwmon/hwmon@{int}/fan* r,
@{sys}/devices/pci[0-9]*/**/eeprom r,
@{sys}/devices/pci[0-9]*/**/hwmon/hwmon@{int}/temp* r,
@{sys}/devices/@{pci}/eeprom r,
@{sys}/devices/@{pci}/hwmon/hwmon@{int}/temp* r,
@{sys}/devices/**/power_supply/** r,
@{PROC}/@{pid}/net/wireless r,

View file

@ -98,7 +98,7 @@ profile htop @{exec_path} {
@{sys}/devices/**/power_supply/**/{uevent,type,online} r,
@{sys}/devices/*/name r,
@{sys}/devices/i2c-[0-9]*/name r,
@{sys}/devices/pci[0-9]*/**/i2c-[0-9]*/name r,
@{sys}/devices/@{pci}/i2c-[0-9]*/name r,
@{sys}/devices/platform/*/i2c-[0-9]*/name r,
@{sys}/devices/system/cpu/cpu@{int}/online r,
@{sys}/devices/system/cpu/cpufreq/policy@{int}/cpuinfo_{cur,min,max}_freq r,

View file

@ -99,7 +99,7 @@ profile hw-probe @{exec_path} {
@{sys}/class/power_supply/ r,
@{sys}/devices/virtual/dmi/id/* r,
@{sys}/devices/pci[0-9]*/**/drm/card[0-9]/*/edid r,
@{sys}/devices/@{pci}/drm/card[0-9]/*/edid r,
@{sys}/devices/**/power_supply/*/uevent r,
@{sys}/firmware/efi/efivars/ r,

View file

@ -85,7 +85,7 @@ profile hwinfo @{exec_path} {
# file_inherit
/dev/ttyS@{int} r,
owner /tmp/hwinfo*.txt rw,
@{sys}/devices/pci[0-9]*/**/drm/card@{int}/ r,
@{sys}/devices/@{pci}/drm/card@{int}/ r,
}

View file

@ -60,7 +60,7 @@ profile hypnotix @{exec_path} {
owner @{user_music_dirs}/** r,
@{sys}/devices/pci[0-9]*/**/drm/ r,
@{sys}/devices/@{pci}/drm/ r,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mounts r,

View file

@ -120,7 +120,7 @@ profile inxi @{exec_path} {
@{bin}/ip mr,
@{sys}/devices/pci[0-9]*/**/net/*/{duplex,address,speed,operstate} r,
@{sys}/devices/@{pci}/net/*/{duplex,address,speed,operstate} r,
/etc/iproute2/group r,
@ -153,7 +153,7 @@ profile inxi @{exec_path} {
@{PROC}/1/environ r,
@{PROC}/sys/kernel/osrelease r,
@{sys}/devices/pci[0-9]*/**/block/**/uevent r,
@{sys}/devices/@{pci}/block/**/uevent r,
@{run}/udev/data/b* r,
}

View file

@ -23,9 +23,9 @@ profile irqbalance @{exec_path} flags=(attach_disconnected) {
@{run}/irqbalance/irqbalance[0-9]*.sock w,
@{sys}/bus/pci/devices/ r,
@{sys}/devices/pci[0-9]*/**/{class,numa_node,local_cpus,irq} r,
@{sys}/devices/pci[0-9]*/**/{vendor,device,subsystem_vendor,subsystem_device} r,
@{sys}/devices/pci[0-9]*/**/msi_irqs/ r,
@{sys}/devices/@{pci}/{class,numa_node,local_cpus,irq} r,
@{sys}/devices/@{pci}/{vendor,device,subsystem_vendor,subsystem_device} r,
@{sys}/devices/@{pci}/msi_irqs/ r,
@{sys}/devices/system/cpu/cpu@{int}/ r,
@{sys}/devices/system/cpu/cpu@{int}/cache/index[0-9]*/shared_cpu_map r,
@{sys}/devices/system/cpu/cpu@{int}/topology/{,**} r,

View file

@ -20,7 +20,7 @@ profile iw @{exec_path} {
@{exec_path} mr,
@{sys}/devices/pci[0-9]*/**/ieee80211/phy[0-9]*/index r,
@{sys}/devices/@{pci}/ieee80211/phy[0-9]*/index r,
# file_inherit
owner /dev/tty@{int} rw,

View file

@ -62,8 +62,8 @@ profile kodi @{exec_path} {
@{sys}/**/ r,
@{sys}/devices/**/uevent r,
@{sys}/devices/pci[0-9]*/**/usb[0-9]/{bDeviceClass,idProduct,idVendor} r,
@{sys}/devices/pci[0-9]*/**/usb[0-9]/**/{bDeviceClass,idProduct,idVendor} r,
@{sys}/devices/@{pci}/usb@{int}/{bDeviceClass,idProduct,idVendor} r,
@{sys}/devices/@{pci}/usb@{int}/**/{bDeviceClass,idProduct,idVendor} r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node@{int}/meminfo r,
@{sys}/devices/system/cpu/cpufreq/policy@{int}/scaling_cur_freq r,

View file

@ -41,7 +41,7 @@ profile labwc @{exec_path} flags=(attach_disconnected) {
@{sys}/class/drm/ r,
@{sys}/class/input/ r,
@{sys}/devices/pci[0-9]*/**/boot_vga r,
@{sys}/devices/@{pci}/boot_vga r,
@{sys}/devices/**/uevent r,
@{run}/udev/data/+acpi:* r, # for ?

View file

@ -23,11 +23,11 @@ profile light @{exec_path} {
@{sys}/class/backlight/ r,
@{sys}/class/leds/ r,
@{sys}/devices/pci[0-9]*/**/drm/**/intel_backlight/{,max_}brightness r,
@{sys}/devices/pci[0-9]*/**/drm/**/intel_backlight/brightness rw,
@{sys}/devices/@{pci}/drm/**/intel_backlight/{,max_}brightness r,
@{sys}/devices/@{pci}/drm/**/intel_backlight/brightness rw,
@{sys}/devices/pci[0-9]*/**/backlight/*/{,max_}brightness r,
@{sys}/devices/pci[0-9]*/**/backlight/*/brightness rw,
@{sys}/devices/@{pci}/backlight/*/{,max_}brightness r,
@{sys}/devices/@{pci}/backlight/*/brightness rw,
# file_inherit
owner /dev/tty@{int} rw,

View file

@ -26,11 +26,11 @@ profile light-locker @{exec_path} {
# when locking the screen and switching/closing sessions
@{run}/systemd/sessions/* r,
@{sys}/devices/pci[0-9]*/**/uevent r,
@{sys}/devices/pci[0-9]*/**/vendor r,
@{sys}/devices/pci[0-9]*/**/device r,
@{sys}/devices/pci[0-9]*/**/subsystem_vendor r,
@{sys}/devices/pci[0-9]*/**/subsystem_device r,
@{sys}/devices/@{pci}/uevent r,
@{sys}/devices/@{pci}/vendor r,
@{sys}/devices/@{pci}/device r,
@{sys}/devices/@{pci}/subsystem_vendor r,
@{sys}/devices/@{pci}/subsystem_device r,
# file_inherit
owner /dev/tty@{int} rw,