From dce8e50dbf5785a7d550c581c56a7e1caf249335 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Wed, 23 Nov 2016 23:44:38 -0500 Subject: moar script --- .../icewease-hardened | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nonprism-testing/iceweasel-hardened-preferences/icewease-hardened (limited to 'nonprism-testing/iceweasel-hardened-preferences/icewease-hardened') diff --git a/nonprism-testing/iceweasel-hardened-preferences/icewease-hardened b/nonprism-testing/iceweasel-hardened-preferences/icewease-hardened new file mode 100644 index 000000000..18602dfc4 --- /dev/null +++ b/nonprism-testing/iceweasel-hardened-preferences/icewease-hardened @@ -0,0 +1,23 @@ +#!/bin/sh +############################################## +# IceWeasel-Hardened Jail and Cleaner Script # +############################################## +echo "Closing any other instances of IceWeasel to avoid crashes..." +pkill iceweasel +wait +echo "Copying Hardened Prefs..." +cp /usr/lib/iceweasel/browser/defaults/preferences/iceweasel-branding.js /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js +wait +echo "Waking the IceWeasel..." + +# Trap cleaner function for IceWeasel exit cleaning +function finish { +echo "Removing hardened preferences..." +echo "" > /usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js + } + +## Firejail IceWeasel startup +firejail --seccomp --noroot --nogroups --caps.drop=all --private-etc=/etc/user.js --private-bin=bash,sed,ls,cat,iceweasel --private-tmp --private-home=~/.mozilla --whitelist=~/Downloads /usr/bin/iceweasel --private-window + +## Exiting IceWeasel triggers the trap +trap finish EXIT \ No newline at end of file -- cgit v1.2.3