aboutsummaryrefslogtreecommitdiff
path: root/straper/db/public/apparmor/apparmor.d/abstractions/devices-usb-read
blob: 3fdb7090ae833c5e5a0dd04c7676ef6bcea7fdcd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# ------------------------------------------------------------------
#
#    Copyright (C) 2021 Mikhail Morfikov
#    Copyright (C) 2021-2025 Alexandre Pujol <alexandre@pujol.io>
#
#    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/4.0>,

  /dev/ r,
  /dev/bus/usb/ r,
  /dev/bus/usb/@{int}/ r,
  /dev/bus/usb/@{int}/@{int} r,

  @{sys}/class/ r,
  @{sys}/class/usbmisc/ r,

  @{sys}/bus/ r,
  @{sys}/bus/usb/ r,
  @{sys}/bus/usb/devices/{,**} r,

  @{sys}/devices/**/usb@{int}/{,**} r,

  # Udev data about usb devices (~equal to content of lsusb -v)
  @{run}/udev/data/+usb:* r,
  @{run}/udev/data/c16[6,7]:@{int} r,   # USB modems
  @{run}/udev/data/c18[0,8,9]:@{int} r, # USB devices & USB serial converters

  include if exists <abstractions/devices-usb-read.d>

# vim:syntax=apparmor