apparmor.d/apparmor.d/profiles-s-z/usbguard-applet-qt
2024-02-26 21:10:53 +00:00

51 lines
1.5 KiB
Plaintext

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/usbguard-applet-qt
profile usbguard-applet-qt @{exec_path} {
include <abstractions/base>
include <abstractions/X>
include <abstractions/gtk>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/freedesktop.org>
include <abstractions/mesa>
include <abstractions/qt5-compose-cache-write>
include <abstractions/dri-enumerate>
include <abstractions/nameservice-strict>
# Needed?
ptrace (read),
@{exec_path} mr,
owner @{user_config_dirs}/USBGuard/ rw,
owner @{user_config_dirs}/USBGuard/* rwkl -> @{user_config_dirs}/USBGuard/#@{int},
/dev/shm/#@{int} rw,
/dev/shm/qb-usbguard-{request,response,event}-@{int}-@{int}-@{int}-{header,data} rw,
/dev/shm/qb-@{int}-@{int}-@{int}-*/qb-{request,response,event}-usbguard-{header,data} rw,
owner @{run}/user/@{uid}/sni-qt_usbguard-applet-qt_@{int}-[a-zA-Z0-9]*/{,**} rw,
owner @{PROC}/@{pid}/cmdline r,
@{PROC}/sys/kernel/core_pattern r,
/usr/share/hwdata/pnp.ids r,
# To configure Qt5 settings (theme, font, icons, etc.) under DE/WM without Qt integration
owner @{user_config_dirs}/qt5ct/{,**} r,
/usr/share/qt5ct/** r,
/var/lib/dbus/machine-id r,
/etc/machine-id r,
include if exists <local/usbguard-applet-qt>
}