Skip to content

Commit

Permalink
grsecurity: make GRKERNSEC y and PAX y implicit
Browse files Browse the repository at this point in the history
These options should always be specified. Note, an implication of this
change is that not specifying any grsec/PaX options results in a build
failure.
  • Loading branch information
joachifm committed Oct 2, 2016
1 parent a58f5ff commit 1bb7b44
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions nixos/modules/security/grsecurity.xml
Expand Up @@ -208,8 +208,6 @@
let
kernel = pkgs.linux_grsec_nixos.override {
extraConfig = ''
GRKERNSEC y
PAX y
GRKERNSEC_CONFIG_AUTO y
GRKERNSEC_CONFIG_SERVER y
GRKERNSEC_CONFIG_SECURITY y
Expand Down
6 changes: 5 additions & 1 deletion pkgs/build-support/grsecurity/default.nix
Expand Up @@ -22,7 +22,11 @@ assert (kernel.version == grsecPatch.kver);
overrideDerivation (kernel.override {
inherit modDirVersion;
kernelPatches = [ grsecPatch ] ++ kernelPatches ++ (kernel.kernelPatches or []);
inherit extraConfig;
extraConfig = ''
GRKERNSEC y
PAX y
${extraConfig}
'';
ignoreConfigErrors = true;
}) (attrs: {
nativeBuildInputs = (lib.chooseDevOutputs [ gmp libmpc mpfr ]) ++ (attrs.nativeBuildInputs or []);
Expand Down
3 changes: 0 additions & 3 deletions pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix
Expand Up @@ -3,9 +3,6 @@
with stdenv.lib;

''
GRKERNSEC y
PAX y
GRKERNSEC_CONFIG_AUTO y
GRKERNSEC_CONFIG_DESKTOP y
GRKERNSEC_CONFIG_VIRT_HOST y
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -10955,8 +10955,6 @@ in
# An unsupported grsec xen guest kernel
linux_grsec_server_xen = linux_grsec_nixos.override {
extraConfig = ''
GRKERNSEC y
PAX y
GRKERNSEC_CONFIG_AUTO y
GRKERNSEC_CONFIG_PRIORITY_SECURITY y
GRKERNSEC_CONFIG_SERVER y
Expand Down

0 comments on commit 1bb7b44

Please sign in to comment.