checksec: clean up
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "checksec-${version}";
|
name = "checksec-${version}";
|
||||||
version = "1.5";
|
version = "1.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.trapkit.de/tools/checksec.sh";
|
url = "http://www.trapkit.de/tools/checksec.sh";
|
||||||
sha256 = "0iq9v568mk7g7ksa1939g5f5sx7ffq8s8n2ncvphvlckjgysgf3p";
|
sha256 = "0iq9v568mk7g7ksa1939g5f5sx7ffq8s8n2ncvphvlckjgysgf3p";
|
||||||
@@ -11,9 +12,9 @@ stdenv.mkDerivation rec {
|
|||||||
patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
|
patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
mkdir ${name}-${version}
|
mkdir ${name}
|
||||||
cp $src ${name}-${version}/checksec.sh
|
cp $src ${name}/checksec.sh
|
||||||
cd ${name}-${version}
|
cd ${name}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -32,8 +33,6 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
|
substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
phases = "unpackPhase patchPhase installPhase";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A tool for checking security bits on executables";
|
description = "A tool for checking security bits on executables";
|
||||||
homepage = "http://www.trapkit.de/tools/checksec.html";
|
homepage = "http://www.trapkit.de/tools/checksec.html";
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
buildInputs = [ libcap openssl ];
|
buildInputs = [ libcap openssl ];
|
||||||
|
|
||||||
|
hardening_pie = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm -rf $out/share/doc
|
rm -rf $out/share/doc
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user