Package: libkeepalive / 0.3-1

hardening-lib.patch Patch series | download
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
26
27
28
29
30
31
32
33
34
35
Description: add hardening flags and soname
Author: Thorsten Alteholz <debian@alteholz.de>
Last-Update: 2013-02-12
Index: libkeepalive/src/Makefile
===================================================================
--- libkeepalive.orig/src/Makefile	2016-11-09 13:35:24.072232211 +0100
+++ libkeepalive/src/Makefile	2016-11-09 13:49:44.360548796 +0100
@@ -9,7 +9,9 @@
 
 CC=gcc
 CFLAGS=-fPIC -ansi -pedantic -Wall
-LDFLAGS=-shared -Wl,-soname,libkeepalive.so
+LDFLAGS=-shared -Wl,-soname,libkeepalive.so.0
+LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+LDFLAGS += -z now
 LDLIBS=-ldl
 
 default: libkeepalive.so
Index: libkeepalive/Makefile
===================================================================
--- libkeepalive.orig/Makefile	2016-11-09 13:35:24.072232211 +0100
+++ libkeepalive/Makefile	2016-11-09 13:35:24.068232321 +0100
@@ -11,9 +11,10 @@
 	make -C src/
 	make -C test/
 	cp src/libkeepalive.so libkeepalive.so
-	strip -s libkeepalive.so
+	strip --strip-unneeded libkeepalive.so
+	ln -s libkeepalive.so libkeepalive.so.0
 
 clean:
 	make -C src/ clean
 	make -C test/ clean
-	rm -f libkeepalive.so
+	rm -f libkeepalive.so*