nginx: Rmove custom hardening, now enabled by default
This commit is contained in:
parent
e9fc4e7db6
commit
fedf31660d
@ -54,14 +54,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
|
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations -Wno-error=conditional-uninitialized";
|
||||||
|
|
||||||
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules)
|
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
|
||||||
+ optionalString (hardening && (stdenv.cc.cc.isGNU or false)) ''
|
|
||||||
configureFlagsArray=(
|
|
||||||
--with-cc-opt="-fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2"
|
|
||||||
--with-ld-opt="-pie -Wl,-z,relro,-z,now"
|
|
||||||
)
|
|
||||||
''
|
|
||||||
;
|
|
||||||
|
|
||||||
hardeningEnable = [ "pie" ];
|
hardeningEnable = [ "pie" ];
|
||||||
|
|
||||||
|
@ -52,14 +52,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
|
NIX_CFLAGS_COMPILE = [ "-I${libxml2}/include/libxml2" ] ++ optional stdenv.isDarwin "-Wno-error=deprecated-declarations";
|
||||||
|
|
||||||
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules)
|
preConfigure = (concatMapStringsSep "\n" (mod: mod.preConfigure or "") modules);
|
||||||
+ optionalString (hardening && (stdenv.cc.cc.isGNU or false)) ''
|
|
||||||
configureFlagsArray=(
|
hardeningEnable = [ "pie" ];
|
||||||
--with-cc-opt="-fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2"
|
|
||||||
--with-ld-opt="-pie -Wl,-z,relro,-z,now"
|
|
||||||
)
|
|
||||||
''
|
|
||||||
;
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv $out/sbin $out/bin
|
mv $out/sbin $out/bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user