Skip to content

Commit a95a742

Browse files
authored
profiles: fixes and cleanups for opening links with firefox (#5919)
1 parent 63b3061 commit a95a742

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

etc/profile-a-l/kube.profile

+12-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ include kube.local
66
# Persistent global definitions
77
include globals.local
88

9-
noblacklist ${HOME}/.gnupg
10-
noblacklist ${HOME}/.mozilla
119
noblacklist ${HOME}/.cache/kube
1210
noblacklist ${HOME}/.config/kube
1311
noblacklist ${HOME}/.config/sink
12+
noblacklist ${HOME}/.gnupg
1413
noblacklist ${HOME}/.local/share/kube
1514
noblacklist ${HOME}/.local/share/sink
1615

@@ -22,23 +21,28 @@ include disable-programs.inc
2221
include disable-shell.inc
2322
include disable-xdg.inc
2423

25-
mkdir ${HOME}/.gnupg
24+
# The lines below are needed to find the default Firefox profile name, to allow
25+
# opening links in an existing instance of Firefox (note that it still fails if
26+
# there isn't a Firefox instance running with the default profile; see #5352)
27+
noblacklist ${HOME}/.mozilla
28+
whitelist ${HOME}/.mozilla/firefox/profiles.ini
29+
2630
mkdir ${HOME}/.cache/kube
2731
mkdir ${HOME}/.config/kube
2832
mkdir ${HOME}/.config/sink
33+
mkdir ${HOME}/.gnupg
2934
mkdir ${HOME}/.local/share/kube
3035
mkdir ${HOME}/.local/share/sink
31-
whitelist ${HOME}/.gnupg
32-
whitelist ${HOME}/.mozilla/firefox/profiles.ini
3336
whitelist ${HOME}/.cache/kube
3437
whitelist ${HOME}/.config/kube
3538
whitelist ${HOME}/.config/sink
39+
whitelist ${HOME}/.gnupg
3640
whitelist ${HOME}/.local/share/kube
3741
whitelist ${HOME}/.local/share/sink
3842
whitelist ${RUNUSER}/gnupg
39-
whitelist /usr/share/kube
4043
whitelist /usr/share/gnupg
4144
whitelist /usr/share/gnupg2
45+
whitelist /usr/share/kube
4246
include whitelist-common.inc
4347
include whitelist-runuser-common.inc
4448
include whitelist-usr-share-common.inc
@@ -63,7 +67,6 @@ tracelog
6367

6468
# disable-mnt
6569
# Add "gpg,gpg2,gpg-agent,pinentry-curses,pinentry-emacs,pinentry-fltk,pinentry-gnome3,pinentry-gtk,pinentry-gtk2,pinentry-gtk-2,pinentry-qt,pinentry-qt4,pinentry-tty,pinentry-x2go,pinentry-kwallet" for gpg
66-
# Add "ignore private-bin" for hyperlinks or have a look at the private-bins in firefox.profile and firefox-common.profile.
6770
private-bin kube,sink_synchronizer
6871
private-cache
6972
private-dev
@@ -75,6 +78,8 @@ dbus-user filter
7578
dbus-user.talk ca.desrt.dconf
7679
dbus-user.talk org.freedesktop.secrets
7780
dbus-user.talk org.freedesktop.Notifications
81+
# allow D-Bus communication with firefox for opening links
82+
dbus-user.talk org.mozilla.*
7883
dbus-system none
7984

8085
restrict-namespaces

etc/profile-m-z/signal-desktop.profile

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ ignore noexec /tmp
1111

1212
noblacklist ${HOME}/.config/Signal
1313

14-
# These lines are needed to allow Firefox to open links
14+
# The lines below are needed to find the default Firefox profile name, to allow
15+
# opening links in an existing instance of Firefox (note that it still fails if
16+
# there isn't a Firefox instance running with the default profile; see #5352)
1517
noblacklist ${HOME}/.mozilla
1618
whitelist ${HOME}/.mozilla/firefox/profiles.ini
1719

@@ -21,11 +23,9 @@ whitelist ${HOME}/.config/Signal
2123
private-etc @tls-ca
2224

2325
dbus-user filter
24-
2526
# allow D-Bus notifications
2627
dbus-user.talk org.freedesktop.Notifications
27-
28-
# allow D-Bus communication with Firefox browsers for opening links
28+
# allow D-Bus communication with firefox for opening links
2929
dbus-user.talk org.mozilla.*
3030

3131
ignore dbus-user none

etc/profile-m-z/trojita.profile

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ include trojita.local
77
include globals.local
88

99
noblacklist ${HOME}/.abook
10-
noblacklist ${HOME}/.mozilla
1110
noblacklist ${HOME}/.cache/flaska.net/trojita
1211
noblacklist ${HOME}/.config/flaska.net
1312

@@ -19,11 +18,16 @@ include disable-programs.inc
1918
include disable-shell.inc
2019
include disable-xdg.inc
2120

21+
# The lines below are needed to find the default Firefox profile name, to allow
22+
# opening links in an existing instance of Firefox (note that it still fails if
23+
# there isn't a Firefox instance running with the default profile; see #5352)
24+
noblacklist ${HOME}/.mozilla
25+
whitelist ${HOME}/.mozilla/firefox/profiles.ini
26+
2227
mkdir ${HOME}/.abook
2328
mkdir ${HOME}/.cache/flaska.net/trojita
2429
mkdir ${HOME}/.config/flaska.net
2530
whitelist ${HOME}/.abook
26-
whitelist ${HOME}/.mozilla/firefox/profiles.ini
2731
whitelist ${HOME}/.cache/flaska.net/trojita
2832
whitelist ${HOME}/.config/flaska.net
2933
include whitelist-common.inc
@@ -49,7 +53,6 @@ seccomp
4953
tracelog
5054

5155
# disable-mnt
52-
# Add "ignore private-bin" for hyperlinks or have a look at the private-bins in firefox.profile and firefox-common.profile.
5356
private-bin trojita
5457
private-cache
5558
private-dev
@@ -58,6 +61,8 @@ private-tmp
5861

5962
dbus-user filter
6063
dbus-user.talk org.freedesktop.secrets
64+
# allow D-Bus communication with firefox for opening links
65+
dbus-user.talk org.mozilla.*
6166
dbus-system none
6267

6368
restrict-namespaces

0 commit comments

Comments
 (0)