apparmor.d/apparmor.d/lsusb

38 lines
887 B
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
# Copyright (C) 2019-2020 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 <abi/3.0>,
#include <tunables/global>
@{exec_path} = /{usr/,}bin/lsusb
profile lsusb @{exec_path} {
#include <abstractions/base>
@{exec_path} mr,
/dev/bus/usb/ r,
/dev/bus/usb/** rw,
@{sys}/class/ r,
@{sys}/bus/ r,
@{sys}/bus/usb/devices/ r,
@{sys}/devices/pci[0-9]*/**/usb[0-9]/{,**} r,
/{var/,}run/udev/data/c189:[0-9]* r, # for /dev/bus/usb/**
/{var/,}run/udev/data/+usb:* r, #
/etc/udev/hwdb.bin r,
#include if exists <local/lsusb>
}