From 0b985a5a327e67d394b35e7d2ce4d9bf2ebcee2d Mon Sep 17 00:00:00 2001
From: Joerg Steffens <joerg.steffens@bareos.com>
Date: Tue, 19 Feb 2013 17:14:55 +0100
Subject: [PATCH 2/2] disable hardening by settings LDFLAGS

---
 debian/rules |    8 +++++++-
 1 Datei geändert, 7 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/debian/rules b/debian/rules
index 7e68870..b1b4130 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,13 @@ DH_VERBOSE = 1
 DH_OPTIONS = -v
 
 # This disables the hardening flags which lead to LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro which breaks the config engine.
-DEB_BUILD_HARDENING = 0
+#DEB_BUILD_HARDENING = 0
+#DEB_LDFLAGS_SET =
+export DEB_BUILD_MAINT_OPTIONS = hardening=-all
+export DEB_LDFLAGS_SET := -Wl,--as-needed
+DPKG_EXPORT_BUILDFLAGS = 1
+-include /usr/share/dpkg/buildflags.mk
+
 
 DAEMON_USER = bareos
 DAEMON_GROUP = bareos
-- 
1.7.10.4

