git.iko.soy/typeable/nixpkgs
on master help sign in
postfix28 and postfix211: hardening with Canary, PIE, Full RELRO and FORTIFY_SOURCE
commit0449962869a473d546da9aee34d0c10da34308fe authorAndrey Arapov <arno@nixaid.com> dateSun 5 Apr 2015, 19:26 (12 years ago) parent8300898
2 files changed+4−3
pkgs/servers/mail/postfix/2.11.nix+3−2 pkgs/servers/mail/postfix/default.nix+1−1
pkgs/servers/mail/postfix/2.11.nix+3−2
@@ -33,8 +33,9 @@ stdenv.mkDerivation rec {
3333 export sendmail_path=$out/bin/sendmail
3434
3535 make makefiles \
36− CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' \
37− AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl'
36+ CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl \
37+ -fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2' \
38+ AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl -pie -Wl,-z,relro,-z,now'
3839 '';
3940
4041 installTargets = [ "non-interactive-package" ];
pkgs/servers/mail/postfix/default.nix+1−1
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
3434 export sample_directory=$out/share/postfix/doc/samples
3535 export readme_directory=$out/share/postfix/doc
3636
37− make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb -lnsl'
37+ make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl -fPIE -fstack-protector-all --param ssp-buffer-size=4 -O2 -D_FORTIFY_SOURCE=2' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb -lnsl -pie -Wl,-z,relro,-z,now'
3838 '';
3939
4040 installPhase = ''