apparmor.d/apparmor.d/groups/browsers/firefox-crashreporter
2022-06-09 21:55:55 +01:00

68 lines
2 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2022 Mikhail Morfikov
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{MOZ_HOMEDIR} = @{HOME}/.mozilla
@{exec_path} = /{usr/,}lib/firefox/crashreporter
profile firefox-crashreporter @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/dconf-write>
include <abstractions/fontconfig-cache-read>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
include <abstractions/nameservice>
include <abstractions/openssl>
include <abstractions/wayland>
signal (receive) set=(term, kill) peer=firefox,
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
@{exec_path} mr,
/{usr/,}lib/firefox/minidump-analyzer rPx,
/{usr/,}bin/mv rix,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/usr/share/X11/xkb/** r,
owner "@{MOZ_HOMEDIR}/firefox/Crash Reports/{,**}" rw,
owner "@{MOZ_HOMEDIR}/firefox/Crash Reports/crashreporter.ini" rw,
owner "@{MOZ_HOMEDIR}/firefox/Crash Reports/events/[0-9a-f]*" rw,
owner "@{MOZ_HOMEDIR}/firefox/Crash Reports/pending/[0-9a-f]*.{dmp,extra}" rw,
owner "@{MOZ_HOMEDIR}/firefox/Crash Reports/submit.log" rw,
owner @{MOZ_HOMEDIR}/firefox/*.*/crashes/{,**} rw,
owner @{MOZ_HOMEDIR}/firefox/*.*/crashes/events/@{uuid} rw,
owner @{MOZ_HOMEDIR}/firefox/*.*/extensions/*.xpi r,
owner @{MOZ_HOMEDIR}/firefox/*.*/minidumps/{,**} rw,
owner @{MOZ_HOMEDIR}/firefox/*.*/minidumps/@{uuid}.{dmp,extra} rw,
owner @{user_cache_dirs}/mozilla/firefox/*.*/** r,
/tmp/ r,
/var/tmp/ r,
owner /tmp/[0-9a-f]*.{dmp,extra} rw,
owner /tmp/firefox/.parentlock w,
owner /dev/shm/org.mozilla.ipc.[0-9]*.[0-9]* r,
/dev/dri/card[0-9]* rw,
/dev/dri/renderD128 rw,
# Silencer
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
include if exists <local/firefox-crashreporter>
}