File: hardening.patch

package info (click to toggle)
smstools 3.1.21-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,900 kB
  • sloc: ansic: 18,785; sh: 1,196; php: 115; makefile: 42; awk: 17
file content (25 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: add some hardening flags
Author: Moritz Muehlenhoff <jmm@debian.org>
Index: smstools3/src/Makefile
===================================================================
--- smstools3.orig/src/Makefile	2017-05-10 13:17:42.885619831 +0200
+++ smstools3/src/Makefile	2017-05-10 13:19:10.286770111 +0200
@@ -1,7 +1,7 @@
 # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
 
 # Select your setup size:
-CFLAGS = -D NUMBER_OF_MODEMS=64
+CFLAGS = -D NUMBER_OF_MODEMS=64 `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS`
 
 # Uncomment for Solaris
 # CFLAGS += -D SOLARIS
@@ -49,6 +49,9 @@
 # Use the following only on GNU/Linux and only if you need ps listing like "smsd: MAINPROCESS" and "smsd: GSM1"
 # CFLAGS += -D USE_LINUX_PS_TRICK
 
+LFLAGS = `dpkg-buildflags --get LDFLAGS`
+LFLAGS += -z now -z relro
+
 ifneq (,$(findstring SOLARIS,$(CFLAGS)))
 ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS)))
 	override LFLAGS += -lsocket -lnsl