From ca0eb9818f3bcb3986dce7ddb52f64fbd38c73ff Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 30 Jan 2014 15:28:38 +0100 Subject: [PATCH] firefox: Add support for grsecurity --- .../applications/networking/browsers/firefox/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix index 2cb884e2e2d3..5d3551ab8ac1 100644 --- a/pkgs/applications/networking/browsers/firefox/default.nix +++ b/pkgs/applications/networking/browsers/firefox/default.nix @@ -91,6 +91,11 @@ rec { #installFlags = "SKIP_GRE_REGISTRATION=1"; + preInstall = '' + # The following is needed for startup cache creation on grsecurity kernels + paxmark m ../objdir/dist/bin/xpcshell + ''; + postInstall = '' # Fix run-mozilla.sh search libDir=$(cd $out/lib && ls -d xulrunner-[0-9]*) @@ -109,6 +114,10 @@ rec { for i in $out/lib/$libDir/*.so; do patchelf --set-rpath "$(patchelf --print-rpath "$i"):$out/lib/$libDir" $i || true done + + # For grsecurity kernels + paxmark m $out/lib/$libDir/{plugin-container,xulrunner} + for i in $out/lib/$libDir/{plugin-container,xulrunner,xulrunner-stub}; do wrapProgram $i --prefix LD_LIBRARY_PATH ':' "$out/lib/$libDir" done