# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2018-2021 Mikhail Morfikov # # 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 , include @{exec_path} = /{usr/,}lib/upower/upowerd @{exec_path} += /usr/libexec/upowerd profile upowerd @{exec_path} { include include network netlink raw, @{exec_path} mr, # UPower config file /etc/UPower/ r, /etc/UPower/UPower.conf r, # The history data for the power device /var/lib/upower/ r, /var/lib/upower/history-*.dat{,.*} rw, # Are all of these needed? (#FIXME#) /dev/input/event* r, @{sys}/bus/hid/devices/ r, @{sys}/class/leds/ r, @{sys}/class/power_supply/ r, @{sys}/class/input/ r, @{sys}/devices/ r, @{sys}/devices/**/power_supply/**/* r, @{sys}/devices/**/uevent r, @{sys}/devices/**/capabilities/* r, @{sys}/devices/virtual/dmi/id/product_name r, @{sys}/devices/platform/**/leds/**/max_brightness r, @{sys}/devices/platform/**/leds/**/brightness rw, @{sys}/devices/platform/**/leds/**/brightness_hw_changed r, @{run}/udev/data/ r, @{run}/udev/data/+power_supply* r, @{run}/udev/data/+input* r, @{run}/udev/data/+hid* r, @{run}/udev/data/c13:[0-9]* r, # for /dev/input/* @{run}/systemd/inhibit/[0-9]*.ref rw, include if exists }