apparmor.d/profiles/upowerd

60 lines
1.6 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# 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.
#
# ------------------------------------------------------------------
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
2021-03-21 17:04:10 +01:00
@{exec_path} = /{usr/,}lib/upower/upowerd
@{exec_path} += /usr/libexec/upowerd
profile upowerd @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
2021-02-13 15:00:16 +01:00
include <abstractions/devices-usb>
2020-12-10 22:33:39 +01:00
network netlink raw,
@{exec_path} mr,
# UPower config file
2020-09-18 20:05:47 +02:00
/etc/UPower/ r,
/etc/UPower/UPower.conf r,
# The history data for the power device
2020-09-18 20:05:47 +02:00
/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,
2020-10-25 10:23:34 +01:00
@{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,
2020-12-10 22:33:39 +01:00
include if exists <local/upowerd>
}