mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
grsecurity: add gradm-3.0-201401291757
This also ensures the appropriate udev rules are installed. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
64ddd86714
commit
f1459cd4b0
51
pkgs/os-specific/linux/gradm/default.nix
Normal file
51
pkgs/os-specific/linux/gradm/default.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{ fetchurl, stdenv, bison, flex, pam,
|
||||||
|
gcc, coreutils, findutils, binutils, bash }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "gradm-${version}";
|
||||||
|
version = "3.0-201401291757";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://grsecurity.net/stable/${name}-${version}.tar.gz";
|
||||||
|
sha256 = "19p7kaqbvf41scc63n69b5v5xzpw3mbf5zy691rply8hdm7736cw";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ gcc coreutils findutils binutils pam flex bison bash ];
|
||||||
|
preBuild = ''
|
||||||
|
substituteInPlace ./Makefile --replace "/usr/include/security/pam_" "${pam}/include/security/pam_"
|
||||||
|
substituteInPlace ./gradm_defs.h --replace "/sbin/grlearn" "$out/sbin/grlearn"
|
||||||
|
substituteInPlace ./gradm_defs.h --replace "/sbin/gradm" "$out/sbin/gradm"
|
||||||
|
substituteInPlace ./gradm_defs.h --replace "/sbin/gradm_pam" "$out/sbin/gradm_pam"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/lib/udev/rules.d
|
||||||
|
cat > $out/lib/udev/rules.d/80-grsec.rules <<EOF
|
||||||
|
ACTION!="add|change", GOTO="permissions_end"
|
||||||
|
KERNEL=="grsec", MODE="0622"
|
||||||
|
LABEL="permissions_end"
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
makeFlags =
|
||||||
|
[ "DESTDIR=$(out)"
|
||||||
|
"CC=${gcc}/bin/gcc"
|
||||||
|
"FLEX=${flex}/bin/flex"
|
||||||
|
"BISON=${bison}/bin/bison"
|
||||||
|
"FIND=${findutils}/bin/find"
|
||||||
|
"STRIP=${binutils}/bin/strip"
|
||||||
|
"INSTALL=${coreutils}/bin/install"
|
||||||
|
"MANDIR=/share/man"
|
||||||
|
"MKNOD=true"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "grsecurity RBAC administration and policy analysis utility";
|
||||||
|
homepage = "https://grsecurity.net";
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||||
|
};
|
||||||
|
}
|
@ -6578,6 +6578,8 @@ let
|
|||||||
|
|
||||||
gpm = callPackage ../servers/gpm { };
|
gpm = callPackage ../servers/gpm { };
|
||||||
|
|
||||||
|
gradm = callPackage ../os-specific/linux/gradm { };
|
||||||
|
|
||||||
hdparm = callPackage ../os-specific/linux/hdparm { };
|
hdparm = callPackage ../os-specific/linux/hdparm { };
|
||||||
|
|
||||||
hibernate = callPackage ../os-specific/linux/hibernate { };
|
hibernate = callPackage ../os-specific/linux/hibernate { };
|
||||||
|
Loading…
Reference in New Issue
Block a user