summaryrefslogtreecommitdiff
path: root/nonprism-testing/icedove-hardened-preferences/icedove-hardened.sh
blob: 8ada03e38749de40a2b7dab0a15ad980355c2f71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

##############################################
# IceDove-Hardened Jail and Cleaner Script #
##############################################
echo "Closing any other instances of IceDove to avoid crashes..."
pkill -x icedove
wait
echo "Copying Hardened Prefs..."
cp /usr/lib/icedove/defaults/preferences/icedove-branding.js /usr/lib/icedove/defaults/preferences/thunderbird-branding.js
wait
echo "Waking the IceDove..."

# Trap cleaner function for IceDove exit cleaning
function finish {
echo "Removing hardened preferences..."
echo "" > /usr/lib/icedove/defaults/preferences/thunderbird-branding.js
    }

## Firejail IceDove startup
/usr/bin/firejail --seccomp --netfilter --nonewprivs --noroot --nogroups --caps.drop=all --private-etc=/etc --private-bin=bash,icedove,gpg2 --private-tmp /usr/bin/icedove

## Exiting IceDove triggers the trap
trap finish EXIT