~ubuntu-branches/ubuntu/quantal/tcp-wrappers/quantal

« back to all changes in this revision

Viewing changes to debian/patches/enable_hardening

  • Committer: Bazaar Package Importer
  • Author(s): Marco d'Itri
  • Date: 2011-06-24 00:21:44 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110624002144-jmo4dr44w2h2alyv
Tags: 7.6.q-21
* Added the proper Breaks/Replaces directives to deal with the man pages
  moved in 7.6.q-20. (Closes: #631252, #631311)
* Enabled IPv6 support for the Hurd build. (Closes: #631247)
* Enabled hardening with hardening-includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/Makefile
 
2
+++ b/Makefile
 
3
@@ -680,6 +680,10 @@ KILL_OPT= -DKILL_IP_OPTIONS
 
4
 ## End configuration options
 
5
 ############################
 
6
 
 
7
+include /usr/share/hardening-includes/hardening.make
 
8
+CFLAGS += $(HARDENING_CFLAGS)
 
9
+LDFLAGS += $(HARDENING_LDFLAGS)
 
10
+
 
11
 # Protection against weird shells or weird make programs.
 
12
 
 
13
 SHELL  = /bin/sh
 
14
@@ -715,7 +719,7 @@ KIT = README miscd.c tcpd.c fromhost.c h
 
15
 LIB    = libwrap.a
 
16
 
 
17
 shared/%.o: %.c
 
18
-       $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
 
19
+       $(CC) $(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(CFLAGS)) $(SHCFLAGS) -c $< -o $@
 
20
 
 
21
 SOMAJOR = 0
 
22
 SOMINOR = 7.6
 
23
@@ -749,7 +753,7 @@ $(LIB):     $(LIB_OBJ)
 
24
 
 
25
 $(SHLIB): libwrap.lds $(SHLIB_OBJ)
 
26
        rm -f $(SHLIB)
 
27
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) $(LIBS)
 
28
+       $(CC) $(filter-out $(HARDENING_DISABLE_PIE_CFLAGS_FILTER),$(CFLAGS)) $(filter-out $(HARDENING_DISABLE_PIE_LDFLAGS_FILTER),$(LDFLAGS)) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) $(LIBS)
 
29
        ln -sf $(notdir $(SHLIB)) $(SHLIBSOMAJ)
 
30
        ln -sf $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
 
31