aboutsummaryrefslogtreecommitdiffstats
path: root/etc/kmail.profile
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2018-03-26 18:59:29 +0200
committerLibravatar smitsohu <smitsohu@gmail.com>2018-03-26 18:59:29 +0200
commit1bc84f3e53f66abf4ee246e89f20f72626a199de (patch)
treea805f3b7068bbddddaa4efc8dfab3c1d03f0421e /etc/kmail.profile
parentdbus.c (diff)
downloadfirejail-1bc84f3e53f66abf4ee246e89f20f72626a199de.tar.gz
firejail-1bc84f3e53f66abf4ee246e89f20f72626a199de.tar.zst
firejail-1bc84f3e53f66abf4ee246e89f20f72626a199de.zip
rework akonadi integration
the usr.sbin.mysqld-akonadi apparmor profile, enforced by default in ubuntu and debian testing (and probably opensuse), doesn't play well with a number of firejail options. the reason for this is that once the no_new_privs bit is set, apparmor profile transitions are forbidden. enforcing our own apparmor policy instead is also no solution, because these programs don't even start without d-bus. relaxing the kmail profile was necessary so that kmail can fire up akonadi itself, just in case akonadi has not been started earlier already by another program. this is always an issue when kmail is the only installed akonadi client, but there may be more circumstances. for reasons outlined above this doesn't help debian and ubuntu (opensuse?) users though :-/ a brief summary of the seccomp exceptions: chroot is needed for qt webengine, io_prioset for the akonadi indexing agent, io_getevents, io_submit, io_setup are needed for mysqld. when akonadi has an sqlite3 backend, less exceptions to the seccomp filter are necessary, but mysqld is the default. in the future all kontact suite profiles (itm only kmail, knotes) should probably be redirections to akonadi_control, but the issues with apparmor make this somewhat impractical for now (options like 'protocol' couldn't go to akonadi_control.local any more, if current kmail redirected to there).
Diffstat (limited to 'etc/kmail.profile')
-rw-r--r--etc/kmail.profile14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/kmail.profile b/etc/kmail.profile
index 952af55c8..e33eae84f 100644
--- a/etc/kmail.profile
+++ b/etc/kmail.profile
@@ -5,20 +5,22 @@ include /etc/firejail/kmail.local
5# Persistent global definitions 5# Persistent global definitions
6include /etc/firejail/globals.local 6include /etc/firejail/globals.local
7 7
8# if akonadi has a mysql backend, starting it inside this sandbox will fail. 8# kmail has problems launching akonadi in debian and ubuntu.
9# one solution is to have akonadi already running when kmail is launched 9# one solution is to have akonadi already running when kmail is started
10 10
11noblacklist ${HOME}/.cache/akonadi* 11noblacklist ${HOME}/.cache/akonadi*
12noblacklist ${HOME}/.config/akonadi* 12noblacklist ${HOME}/.config/akonadi*
13noblacklist ${HOME}/.config/baloorc 13noblacklist ${HOME}/.config/baloorc
14noblacklist ${HOME}/.config/emailidentities 14noblacklist ${HOME}/.config/emailidentities
15noblacklist ${HOME}/.config/kmail2rc 15noblacklist ${HOME}/.config/kmail2rc
16noblacklist ${HOME}/.local/share/akonadi/* 16noblacklist ${HOME}/.gnupg
17noblacklist ${HOME}/.local/share/akonadi*
17noblacklist ${HOME}/.local/share/contacts 18noblacklist ${HOME}/.local/share/contacts
18noblacklist ${HOME}/.local/share/emailidentities 19noblacklist ${HOME}/.local/share/emailidentities
19noblacklist ${HOME}/.local/share/kmail2 20noblacklist ${HOME}/.local/share/kmail2
20noblacklist ${HOME}/.local/share/local-mail 21noblacklist ${HOME}/.local/share/local-mail
21noblacklist ${HOME}/.gnupg 22noblacklist ${HOME}/.local/share/notes
23noblacklist /tmp/akonadi-*
22 24
23include /etc/firejail/disable-common.inc 25include /etc/firejail/disable-common.inc
24include /etc/firejail/disable-devel.inc 26include /etc/firejail/disable-devel.inc
@@ -36,8 +38,8 @@ nosound
36notv 38notv
37novideo 39novideo
38protocol unix,inet,inet6,netlink 40protocol unix,inet,inet6,netlink
39# we need to allow chroot and ioprio_set system calls 41# we need to allow chroot, io_getevents, ioprio_set, io_setup, io_submit system calls
40seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,io_getevents,io_setup,io_submit,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice 42seccomp.drop @clock,@cpu-emulation,@debug,@module,@obsolete,@raw-io,@reboot,@resources,@swap,acct,add_key,bpf,fanotify_init,io_cancel,io_destroy,kcmp,keyctl,mount,name_to_handle_at,nfsservctl,ni_syscall,open_by_handle_at,personality,pivot_root,process_vm_readv,ptrace,remap_file_pages,request_key,setdomainname,sethostname,syslog,umount,umount2,userfaultfd,vhangup,vmsplice
41# tracelog 43# tracelog
42# writable-run-user is needed for signing and encrypting emails 44# writable-run-user is needed for signing and encrypting emails
43writable-run-user 45writable-run-user