NixOS/nixpkgs — pull request #1771 by thoughtpolice (2014-02-18 05:32:26+00:00)
Title: grsecurity: add gradm, paxctl, and pax-utils (take #2)

Per the #1765 (hopefully without GitHub eating my pull requests again).

* I cleaned up the 'meta' info to always reside at the bottom per recommendation.
* Per point two by @wizeman - the 'gcc' etc `buildInputs` seem to be required. Especially for GCC, because the Makefile for `gradm` is hard-coded to otherwise use `/usr/bin/gcc` it seems, which results in `ld` failing due to an impure link at the end. The makefile is a bit hacky unfortunately so IMO it's safer to properly specify all the tools it needs explicitly.

Otherwise I think this is good to go.

---
This adds 3 packages you might typically want with a grsec deployment.

The pieces here basically overlap some of with #1187 (which I found after I wrote my own `gradm` package). This also installs the udev rules for `gradm`.

Unlike the work by @wizeman it doesn't attempt to properly mark JIT binaries via `paxctl` - it only adds the packages. But I think there's no reason to hold back the packages even without this.

And `pax-utils` is from the Hardened Gentoo project, and includes some useful utilities (like `pspax`).