2020-12-24 13:55:12 +01:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
2020-12-24 13:55:12 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
|
|
|
abi <abi/3.0>,
|
|
|
|
|
|
|
|
include <tunables/global>
|
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}lib/systemd/systemd-backlight
|
|
|
|
profile systemd-backlight @{exec_path} flags=(complain) {
|
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/systemd-common>
|
|
|
|
|
|
|
|
# Needed?
|
|
|
|
deny capability net_admin,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
@{sys}/bus/ r,
|
|
|
|
@{sys}/class/ r,
|
|
|
|
@{sys}/class/backlight/ r,
|
|
|
|
|
|
|
|
@{sys}/devices/pci[0-9]*/**/class r,
|
|
|
|
@{sys}/devices/pci[0-9]*/**/backlight/**/brightness rw,
|
|
|
|
@{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]*/**/drm/card[0-9]*/**/brightness rw,
|
|
|
|
@{sys}/devices/pci[0-9]*/**/drm/card[0-9]*/**/{max_brightness,actual_brightness} r,
|
|
|
|
@{sys}/devices/pci[0-9]*/**/drm/card[0-9]*/**/{uevent,type} r,
|
|
|
|
|
|
|
|
@{sys}/devices/platform/**/leds/*backlight*/uevent r,
|
|
|
|
@{sys}/devices/platform/**/leds/*backlight*/max_brightness r,
|
|
|
|
@{sys}/devices/platform/**/leds/*backlight*/brightness rw,
|
|
|
|
|
|
|
|
|
|
|
|
@{run}/udev/data/+backlight:* r,
|
|
|
|
@{run}/udev/data/+leds:*backlight* r,
|
|
|
|
|
|
|
|
/var/lib/systemd/backlight/*backlight* rw,
|
|
|
|
|
|
|
|
}
|
|
|
|
|