66 lines
1.9 KiB
Text
66 lines
1.9 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>
|
|
|
|
@{firefox_name} = firefox{,.sh,-esr,-bin}
|
|
@{firefox_lib_dirs} = @{lib}/@{firefox_name} /opt/@{firefox_name}
|
|
@{firefox_config_dirs} = @{HOME}/.mozilla/
|
|
@{firefox_cache_dirs} = @{user_cache_dirs}/mozilla/
|
|
|
|
@{exec_path} = @{firefox_lib_dirs}/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,
|
|
|
|
@{firefox_lib_dirs}/minidump-analyzer rPx,
|
|
|
|
@{bin}/mv rix,
|
|
|
|
/usr/share/X11/xkb/** r,
|
|
|
|
owner "@{firefox_config_dirs}/firefox/Crash Reports/{,**}" rw,
|
|
owner @{firefox_config_dirs}/*.*/crashes/{,**} rw,
|
|
owner @{firefox_config_dirs}/*.*/crashes/events/@{uuid} rw,
|
|
owner @{firefox_config_dirs}/*.*/extensions/*.xpi r,
|
|
owner @{firefox_config_dirs}/*.*/minidumps/{,**} rw,
|
|
owner @{firefox_config_dirs}/*.*/minidumps//@{uuid}.{dmp,extra} r,
|
|
owner @{firefox_config_dirs}/*.*/storage/default/* r,
|
|
|
|
owner @{firefox_cache_dirs}/firefox/*.*/** r,
|
|
|
|
/tmp/ r,
|
|
/var/tmp/ r,
|
|
owner /tmp/@{hex}.{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>
|
|
}
|