apparmor.d/apparmor.d/groups/systemd/systemd-backlight
Alexandre Pujol 275d6b6e62
feat(profiles): replace old [0-9]* glob by @{int}
Beware some [0-9]* glob are actually not proper @{int}.
2023-08-18 17:09:53 +01:00

46 lines
1.5 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/systemd/systemd-backlight
profile systemd-backlight @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
capability net_admin,
@{exec_path} mr,
/var/lib/systemd/backlight/*backlight* rw,
@{run}/udev/data/+pci:* r,
@{run}/udev/data/+backlight:* r,
@{run}/udev/data/+leds:*backlight* r,
@{sys}/bus/ r,
@{sys}/bus/pci/devices/ r,
@{sys}/class/ r,
@{sys}/class/backlight/ r,
@{sys}/devices/pci[0-9]*/*:@{int}.@{int}/**/ r,
@{sys}/devices/pci[0-9]*/**/ r,
@{sys}/devices/pci[0-9]*/**/backlight/**/{max_brightness,actual_brightness} r,
@{sys}/devices/pci[0-9]*/**/backlight/**/{uevent,type} r,
@{sys}/devices/pci[0-9]*/**/backlight/**/brightness rw,
@{sys}/devices/pci[0-9]*/**/class r,
@{sys}/devices/pci[0-9]*/**/drm/card@{int}/**/{max_brightness,actual_brightness} r,
@{sys}/devices/pci[0-9]*/**/drm/card@{int}/**/{uevent,type} r,
@{sys}/devices/pci[0-9]*/**/drm/card@{int}/**/brightness rw,
@{sys}/devices/pci[0-9]*/**/uevent r,
@{sys}/devices/platform/**/leds/*backlight*/brightness rw,
@{sys}/devices/platform/**/leds/*backlight*/max_brightness r,
@{sys}/devices/platform/**/leds/*backlight*/uevent r,
include if exists <local/systemd-backlight>
}