apparmor.d/profiles/blueman
2021-04-01 16:17:47 +01:00

108 lines
2.5 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/blueman-*
profile blueman @{exec_path} {
include <abstractions/base>
include <abstractions/python>
include <abstractions/fonts>
include <abstractions/fontconfig-cache-read>
include <abstractions/gtk>
include <abstractions/freedesktop.org>
include <abstractions/thumbnails-cache-read>
include <abstractions/user-download-strict>
include <abstractions/audio>
network inet stream,
network inet6 stream,
network bluetooth raw,
@{exec_path} mrix,
/{usr/,}bin/python3.[0-9]* r,
/{usr/,}bin/ r,
/{usr/,}bin/dash rix,
/{usr/,}bin/xdg-open rCx -> open,
/usr/share/blueman/{,**} r,
owner @{HOME}/.cache/blueman-tray-[0-9]* rw,
owner @{HOME}/.cache/blueman-services-[0-9]* rw,
owner @{HOME}/.cache/blueman-adapters-[0-9]* rw,
owner @{HOME}/.cache/blueman-manager-[0-9]* rw,
owner @{HOME}/.cache/blueman-applet-[0-9]* rw,
owner @{HOME}/.cache/obexd/ rw,
owner @{HOME}/.cache/obexd/* rw,
owner @{HOME}/ r,
owner @{HOME}/bluetooth*/ r,
owner @{HOME}/bluetooth*/* rw,
# For sending a note (disabled since the feature doesn't seem to work)
#owner /tmp/* rw,
#owner /var/tmp/* rw,
#owner /tmp/note*.vnt rw,
/var/lib/blueman/network.state r,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/@{pid}/cmdline r,
include <abstractions/dconf>
owner @{run}/user/[0-9]*/dconf/ rw,
owner @{run}/user/[0-9]*/dconf/user rw,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/dev/rfkill r,
/dev/shm/ r,
/var/lib/dbus/machine-id r,
/etc/machine-id r,
profile open {
include <abstractions/base>
include <abstractions/xdg-open>
/{usr/,}bin/xdg-open mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/gawk rix,
/{usr/,}bin/readlink rix,
/{usr/,}bin/basename rix,
/{usr/,}bin/uname rix,
/{usr/,}bin/xprop rix,
/{usr/,}bin/file rix,
/{usr/,}bin/dbus-send rix,
/{usr/,}bin/mimetype rix,
/usr/share/perl5/** r,
/etc/magic r,
owner @{HOME}/ r,
owner @{HOME}/bluetooth*/* r,
owner @{run}/user/[0-9]*/ r,
# Allowed apps to open
/{usr/,}lib/firefox/firefox rPx,
/{usr/,}bin/spacefm rPx,
# file_inherit
owner @{HOME}/.xsession-errors w,
}
include if exists <local/blueman>
}