diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-06-30 14:26:23 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-08-09 12:44:50 +0200 |
commit | 9f822e5477bc32b77af39b5bf8cf50b56b97c196 (patch) | |
tree | 910f6142a6da027a9012b95199f11bc9a463cd03 /pkgs/os-specific/linux/paxctl | |
parent | d7b356f73b41640f5ee741f004c4fb41e0471d30 (diff) |
stdenv: Move paxmark function to paxctl's setup hook
Diffstat (limited to 'pkgs/os-specific/linux/paxctl')
-rw-r--r-- | pkgs/os-specific/linux/paxctl/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/paxctl/setup-hook.sh | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/paxctl/default.nix b/pkgs/os-specific/linux/paxctl/default.nix index 8e70ddd84349d..795ffa38ac4d3 100644 --- a/pkgs/os-specific/linux/paxctl/default.nix +++ b/pkgs/os-specific/linux/paxctl/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { "MANDIR=share/man/man1" ]; + setupHook = ./setup-hook.sh; + meta = with stdenv.lib; { description = "A tool for controlling PaX flags on a per binary basis"; homepage = "https://pax.grsecurity.net"; diff --git a/pkgs/os-specific/linux/paxctl/setup-hook.sh b/pkgs/os-specific/linux/paxctl/setup-hook.sh new file mode 100644 index 0000000000000..11a6bb9910f94 --- /dev/null +++ b/pkgs/os-specific/linux/paxctl/setup-hook.sh @@ -0,0 +1,8 @@ +# PaX-mark binaries. +paxmark() { + local flags="$1" + shift + + paxctl -c "$@" + paxctl -zex -${flags} "$@" +} |