kernel: enable AppArmor by default
AppArmor only requires a few patches to the 3.2 and 3.4 kernels in order to work properly (with the minor catch grsecurity -stable includes the 3.2 patches.) This adds them to the kernel builds by default, removes features.apparmor (since it's always true) and makes it the default MAC system. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
@@ -26,37 +26,12 @@ let
|
||||
inherit sha256;
|
||||
};
|
||||
features.grsecurity = true;
|
||||
# The grsec kernel patchset includes AppArmor patches
|
||||
features.apparmor = true;
|
||||
};
|
||||
|
||||
makeAppArmorPatch = {apparmor, version}:
|
||||
stdenv.mkDerivation {
|
||||
name = "apparmor-${version}.patch";
|
||||
phases = ["installPhase"];
|
||||
installPhase = ''
|
||||
cat ${apparmor}/kernel-patches/${version}/* > $out
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
|
||||
apparmor_3_2 = rec {
|
||||
version = "3.2";
|
||||
name = "apparmor-${version}";
|
||||
patch = makeAppArmorPatch { inherit apparmor version; };
|
||||
features.apparmor = true;
|
||||
};
|
||||
|
||||
apparmor_3_4 = rec {
|
||||
version = "3.4";
|
||||
name = "apparmor-${version}";
|
||||
patch = makeAppArmorPatch { inherit apparmor version; };
|
||||
features.apparmor = true;
|
||||
};
|
||||
|
||||
no_xsave =
|
||||
{ name = "no-xsave";
|
||||
patch = ./no-xsave.patch;
|
||||
|
||||
Reference in New Issue
Block a user