@@ -33,8 +33,9 @@ stdenv.mkDerivation rec {
33 export sendmail_path=$out/bin/sendmail
33 export sendmail_path=$out/bin/sendmail
35 make makefiles \
35 make makefiles \
36− CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' \
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' \
37− AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl'
38+ AUXLIBS='-ldb -lnsl -lresolv -lsasl2 -lcrypto -lssl -pie -Wl,-z,relro,-z,now'
40 installTargets = [ "non-interactive-package" ];
41 installTargets = [ "non-interactive-package" ];