apparmor.d/apparmor.d/profiles-a-f/blueman
2022-11-29 11:57:23 +00:00

107 lines
2.7 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/blueman-*
profile blueman @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/audio>
include <abstractions/dconf-write>
include <abstractions/fontconfig-cache-read>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
include <abstractions/python>
include <abstractions/thumbnails-cache-read>
include <abstractions/user-download-strict>
network inet stream,
network inet6 stream,
network bluetooth raw,
ptrace (read) peer=gjs-console,
@{exec_path} mrix,
/{usr/,}bin/{b,d}ash rix,
/{usr/,}lib/gio-launch-desktop rix,
/{usr/,}bin/blueman-tray rPx,
/{usr/,}bin/xdg-open rCx -> open,
/usr/share/blueman/{,**} r,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/share/X11/xkb/{,**} r,
/etc/machine-id r,
/var/lib/dbus/machine-id r,
/var/lib/blueman/network.state r,
owner @{HOME}/ r,
owner @{HOME}/bluetooth*/ r,
owner @{HOME}/bluetooth*/* rw,
owner @{user_cache_dirs}/blueman-tray-[0-9]* rw,
owner @{user_cache_dirs}/blueman-services-[0-9]* rw,
owner @{user_cache_dirs}/blueman-adapters-[0-9]* rw,
owner @{user_cache_dirs}/blueman-manager-[0-9]* rw,
owner @{user_cache_dirs}/blueman-applet-[0-9]* rw,
owner @{user_cache_dirs}/obexd/ rw,
owner @{user_cache_dirs}/obexd/* rw,
owner @{run}/user/@{uid}/gdm/Xauthority r,
owner @{run}/user/@{uid}/wayland-cursor-shared-* rw,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mounts r,
@{PROC}/@{pids}/cmdline r,
/dev/dri/card[0-9]* rw,
/dev/rfkill r,
/dev/shm/ r,
/dev/tty rw,
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
profile open {
include <abstractions/base>
include <abstractions/xdg-open>
/{usr/,}bin/xdg-open mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/basename rix,
/{usr/,}bin/dbus-send rix,
/{usr/,}bin/file rix,
/{usr/,}bin/{m,g,}awk rix,
/{usr/,}bin/mimetype rix,
/{usr/,}bin/readlink rix,
/{usr/,}bin/uname rix,
/{usr/,}bin/xprop rix,
# Allowed apps to open
/{usr/,}lib/firefox/firefox rPx,
/{usr/,}bin/spacefm rPx,
/usr/share/perl5/** r,
/etc/magic r,
owner @{HOME}/ r,
owner @{HOME}/bluetooth*/* r,
owner @{HOME}/.xsession-errors w,
owner @{run}/user/@{uid}/ r,
}
include if exists <local/blueman>
}