Package: libkeepalive / 0.2-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
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	2013-02-13 14:45:05.000000000 +0100
+++ libkeepalive/src/Makefile	2013-02-13 14:46:07.000000000 +0100
@@ -9,7 +9,8 @@
 
 CC=gcc
 CFLAGS=-fPIC
-LDFLAGS=-shared -Wl,-soname,libkeepalive.so
+LDFLAGS=-shared -Wl,-soname,libkeepalive.so.0
+LDFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
 LDLIBS=-ldl
 
 default: libkeepalive.so
Index: libkeepalive/Makefile
===================================================================
--- libkeepalive.orig/Makefile	2013-02-13 14:45:05.000000000 +0100
+++ libkeepalive/Makefile	2013-02-13 14:47:47.000000000 +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*