From 1939da5efd11dcc05bfac7b5c73defd98096e5ca Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Thu, 24 Nov 2016 00:18:31 -0500 Subject: pkill work around --- .../iceweasel-hardened-preferences/PKGBUILD | 9 ++++---- .../ice.weasel-hardened.sh | 24 ++++++++++++++++++++++ .../iceweasel-hardened.sh | 23 --------------------- 3 files changed, 29 insertions(+), 27 deletions(-) create mode 100755 nonprism-testing/iceweasel-hardened-preferences/ice.weasel-hardened.sh delete mode 100644 nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh (limited to 'nonprism-testing') diff --git a/nonprism-testing/iceweasel-hardened-preferences/PKGBUILD b/nonprism-testing/iceweasel-hardened-preferences/PKGBUILD index b37e5231e..ee7fada9d 100644 --- a/nonprism-testing/iceweasel-hardened-preferences/PKGBUILD +++ b/nonprism-testing/iceweasel-hardened-preferences/PKGBUILD @@ -11,17 +11,18 @@ replaces=('iceweasel-hardened') depends=('iceweasel-noscript') url="https://wiki.parabola.nu/${pkgname%-*}" source=('firefox-branding.js' -'iceweasel-hardened.sh' +'ice.weasel-hardened.sh' 'iceweasel-branding.js') sha512sums=('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e' -'0e65aec4e7ae1f3ab792522b0b9cdb9b4c465553907639af38bf2cacd4745010d1864a17467575421c35f7356c2b506a34abbfb0b36a38ed00364bc1e62f0948' +'32c69985907c43fdaa36f5f7fe14e5c39a43e20274ed4b3d8e4cbc7f778be28bd7f718fea2f199f0ea862b19e3b30345844d3df6230e71d2912ef9cd006ce392' '733553fc5fc05ea8b7183b33b046afe30c2004f7a73dd289c8107dba5e2a997827267a9b5f26979e85e7b4eae4e12ce89c205fd81ba5bfd50df08f4dd716208f') whirlpoolsums=('19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3' -'014df01761ba8cc9146331f861065f52adbe4260f6f29b573955a55f5491355f8b7608c1a72fc38e62947bb00c36050f9f03be83eae9ac5f6fe08307fc79d4b3' +'c7df8d9c2b10a0423bf91a6b5dc492c1af9ca4caf12f8383237300f522848e8120e334cb2b82057709eafc321d45b2d084c636124d977a97ea263f695c869a58' '88be3317fc78e4bbaf79f080c7270d78a90f152f96fa067f2215915285ba8573ee46071856c2578bd3e02a678e783313131f3c2dcf6a02f2f862edd9de0a7820') package() { install -Dm644 iceweasel-branding.js "$pkgdir"/usr/lib/iceweasel/browser/defaults/preferences/iceweasel-branding.js install -Dm766 firefox-branding.js "$pkgdir"/usr/lib/iceweasel/browser/defaults/preferences/firefox-branding.js - install -Dm644 iceweasel-hardened.sh "$pkgdir"/usr/bin/iceweasel-hardened + install -Dm755 ice.weasel-hardened.sh "$pkgdir"/usr/bin/ice.weasel-hardened.sh + ln -s "/usr/bin/ice.weasel-hardened.sh" "${pkgdir}/usr/bin/iceweasel-hardened" } diff --git a/nonprism-testing/iceweasel-hardened-preferences/ice.weasel-hardened.sh b/nonprism-testing/iceweasel-hardened-preferences/ice.weasel-hardened.sh new file mode 100755 index 000000000..2808c6cb4 --- /dev/null +++ b/nonprism-testing/iceweasel-hardened-preferences/ice.weasel-hardened.sh @@ -0,0 +1,24 @@ +#!/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 +/usr/bin/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 diff --git a/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh b/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh deleted file mode 100644 index 18602dfc4..000000000 --- a/nonprism-testing/iceweasel-hardened-preferences/iceweasel-hardened.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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