apparmor.d/apparmor.d/profiles-a-f/fprintd

53 lines
1.5 KiB
Text

# apparmor.d - Full set of apparmor profiles
# 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}/fprintd
profile fprintd @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/dbus-strict>
include <abstractions/devices-usb>
include <abstractions/nameservice-strict>
capability sys_nice,
network netlink raw,
dbus receive bus=system path=/net/reactivated/Fprint/Manager
interface={org.freedesktop.DBus.Properties,net.reactivated.Fprint.Manager},
dbus send bus=system path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
member={RequestName,ReleaseName}
peer=(name=org.freedesktop.DBus),
dbus send bus=system path=/org/freedesktop/login[0-9]
interface=org.freedesktop.login[0-9].Manager
member=Inhibit
peer=(name=org.freedesktop.login[0-9]),
dbus bind bus=system
name=net.reactivated.Fprint,
@{exec_path} mr,
/etc/fprintd.conf r,
/var/lib/fprint/{,**} rw,
@{run}/systemd/journal/socket rw,
@{run}/systemd/inhibit/*.ref w,
@{run}/udev/data/c23[4-9]:[0-9]* r, # For dynamic assignment range 234 to 254
@{run}/udev/data/c24[0-9]:[0-9]* r,
@{run}/udev/data/c25[0-4]:[0-9]* r,
@{sys}/class/hidraw/ r,
@{sys}/devices/pci[0-9]*/**/hidraw/hidraw[0-9]*/uevent r,
@{sys}/devices/virtual/**/hidraw/hidraw[0-9]*/uevent r,
include if exists <local/fprintd>
}