Skip to content

Commit e4913eb

Browse files
authored
Create mullvad-browser.profile (#5887)
Homepage: https://mullvad.net/en/download/browser/linux mullvad-browser: don't use restrict-namespaces mullvad-browser: cover both installation paths Suggested in review by @kmk3.
1 parent 9057fd7 commit e4913eb

File tree

4 files changed

+106
-0
lines changed

4 files changed

+106
-0
lines changed

etc/apparmor/firejail-local

+3
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
# Uncomment to opt-in to apparmor for firefox native-messaging-hosts under ${HOME}
2121
#owner @{HOME}/.mozilla/native-messaging-hosts/** ix,
2222

23+
# Uncomment to opt-in to apparmor for mullvad-browser under ${HOME}
24+
#owner @{HOME}/.local/share/mullvad-browser/** ix,
25+
2326
# Uncomment to opt-in to apparmor for torbrowser-launcher
2427
#owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/** ix,

etc/inc/disable-programs.inc

+5
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ blacklist ${HOME}/.cache/ms-outlook-online
178178
blacklist ${HOME}/.cache/ms-powerpoint-online
179179
blacklist ${HOME}/.cache/ms-skype-online
180180
blacklist ${HOME}/.cache/ms-word-online
181+
blacklist ${HOME}/.cache/mullvad/mullvadbrowser
181182
blacklist ${HOME}/.cache/mutt
182183
blacklist ${HOME}/.cache/mypaint
183184
blacklist ${HOME}/.cache/netsurf
@@ -550,6 +551,7 @@ blacklist ${HOME}/.config/mpDris2
550551
blacklist ${HOME}/.config/mpd
551552
blacklist ${HOME}/.config/mps-youtube
552553
blacklist ${HOME}/.config/mpv
554+
blacklist ${HOME}/.config/mullvad-browser-flags.conf
553555
blacklist ${HOME}/.config/mupen64plus
554556
blacklist ${HOME}/.config/mutt
555557
blacklist ${HOME}/.config/mutter
@@ -977,6 +979,7 @@ blacklist ${HOME}/.local/share/meld
977979
blacklist ${HOME}/.local/share/midori
978980
blacklist ${HOME}/.local/share/minder
979981
blacklist ${HOME}/.local/share/mirage
982+
blacklist ${HOME}/.local/share/mullvad-browser
980983
blacklist ${HOME}/.local/share/multimc
981984
blacklist ${HOME}/.local/share/multimc5
982985
blacklist ${HOME}/.local/share/mupen64plus
@@ -1063,6 +1066,7 @@ blacklist ${HOME}/.mpd
10631066
blacklist ${HOME}/.mpdconf
10641067
blacklist ${HOME}/.mplayer
10651068
blacklist ${HOME}/.msmtprc
1069+
blacklist ${HOME}/.mullvad/mullvadbrowser
10661070
blacklist ${HOME}/.multimc5
10671071
blacklist ${HOME}/.nanorc
10681072
blacklist ${HOME}/.netactview
@@ -1196,6 +1200,7 @@ blacklist ${HOME}/SoftMaker
11961200
blacklist ${HOME}/Standard Notes Backups
11971201
blacklist ${HOME}/TeamSpeak3-Client-linux_amd64
11981202
blacklist ${HOME}/TeamSpeak3-Client-linux_x86
1203+
blacklist ${HOME}/UpdateInfo
11991204
blacklist ${HOME}/hyperrogue.ini
12001205
blacklist ${HOME}/i2p
12011206
blacklist ${HOME}/mps
+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Firejail profile for mullvad-browser
2+
# Description: Privacy-focused web browser developed in a collaboration between Mullvad VPN and the Tor Project
3+
# This file is overwritten after every install/update
4+
# Persistent local customizations
5+
include mullvad-browser.local
6+
# Persistent global definitions
7+
include globals.local
8+
9+
# IMPORTANT ##########################################
10+
# The mullvad-browser can be downloaded from the official website
11+
# and installed manually or via the AUR for Arch Linux (derivatives).
12+
# The latter installs the browser under /opt/mullvad-browser, while
13+
# the former can be installed under ${HOME} just about anywhere.
14+
# If you decide to install it under ${HOME} this profile assumes to find
15+
# the browser files under ${HOME}/.local/share/mullvad-browser.
16+
# When you divert from that location you will need to make the needed
17+
# path adjustments yourself in the below instructions.
18+
####################################################
19+
20+
# If you installed under ${HOME}, put the below line in your
21+
# mullvad-browser.local
22+
# Note: The relevant rule in /etc/apparmor.d/local/firejail-default will
23+
# need to be uncommented for the 'apparmor' option to work as expected.
24+
#ignore noexec ${HOME}
25+
26+
noblacklist ${HOME}/.cache/mullvad/mullvadbrowser
27+
noblacklist ${HOME}/.config/mullvad-browser-flags.conf
28+
noblacklist ${HOME}/.local/share/mullvad-browser
29+
noblacklist ${HOME}/.mullvad/mullvadbrowser
30+
31+
# Allow python 3 (blacklisted by disable-interpreters.inc)
32+
include allow-python3.inc
33+
34+
blacklist /srv
35+
blacklist /sys/class/net
36+
blacklist /usr/libexec
37+
38+
include disable-common.inc
39+
include disable-devel.inc
40+
include disable-exec.inc
41+
include disable-interpreters.inc
42+
include disable-proc.inc
43+
include disable-programs.inc
44+
include disable-xdg.inc
45+
46+
mkdir ${HOME}/.cache/mullvad/mullvadbrowser
47+
mkdir ${HOME}/.local/share/mullvad-browser
48+
mkdir ${HOME}/.mullvad/mullvadbrowser
49+
mkfile ${HOME}/.config/mullvad-browser-flags.conf
50+
whitelist ${DOWNLOADS}
51+
whitelist ${HOME}/.cache/mullvad/mullvadbrowser
52+
whitelist ${HOME}/.config/mullvad-browser-flags.conf
53+
whitelist ${HOME}/.local/share/mullvad-browser
54+
whitelist ${HOME}/.mullvad/mullvadbrowser
55+
whitelist /opt/mullvad-browser
56+
include whitelist-common.inc
57+
include whitelist-run-common.inc
58+
include whitelist-runuser-common.inc
59+
include whitelist-usr-share-common.inc
60+
include whitelist-var-common.inc
61+
62+
apparmor
63+
caps.drop all
64+
netfilter
65+
nodvd
66+
nogroups
67+
noinput
68+
nonewprivs
69+
noroot
70+
notv
71+
nou2f
72+
novideo
73+
protocol unix,inet,inet6
74+
seccomp !chroot
75+
seccomp.block-secondary
76+
#tracelog - may cause issues, see #1930
77+
78+
disable-mnt
79+
private-bin bash,cat,cp,cut,dirname,env,expr,file,gpg,grep,gxmessage,id,kdialog,ln,mkdir,mullvad-browser,mv,python*,rm,sed,sh,tail,tar,tclsh,test,update-desktop-database,xmessage,xz,zenity
80+
private-dev
81+
private-etc @tls-ca
82+
#private-opt mullvad-browser - can cause slow startup
83+
private-tmp
84+
85+
blacklist ${PATH}/curl
86+
blacklist ${PATH}/wget
87+
blacklist ${PATH}/wget2
88+
89+
dbus-user filter
90+
dbus-user.own org.mozilla.mullvadbrowser.*
91+
dbus-system none
92+
93+
# cfr. start-mullvad-browser
94+
# do not (try to) connect to the session manager
95+
rmenv SESSION_MANAGER
96+
97+
#restrict-namespaces

src/firecfg/firecfg.config

+1
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ ms-powerpoint
579579
ms-skype
580580
ms-word
581581
mtpaint
582+
mullvad-browser
582583
multimc
583584
multimc5
584585
mumble

0 commit comments

Comments
 (0)