1
0
Quellcode durchsuchen

Don't pass the full LDFLAGS set to bgpdump creation. Closes: #945881

Passing LDFLAGS when linking the bgpdump program was meant to create
hardening builds - which actually did the trick. With a side effect
however: LDFLAGS contains the -shared option, resulting in a binary that
segfaults at the first function call.

Pass the linker flags for hardening build manually for the time being.
Christoph Biedl vor 5 Jahren
Ursprung
Commit
3990f95b19
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      debian/patches/use-ldflags-for-linking.patch

+ 1 - 1
debian/patches/use-ldflags-for-linking.patch

@@ -10,7 +10,7 @@ Last-Update: 2019-01-27
  
  bgpdump: bgpdump.c libbgpdump.a
 -	$(COMPILE) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
-+	$(COMPILE) $(LDFLAGS) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
++	$(COMPILE) -Wl,-z,relro -Wl,-z,now -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
  
  check-clean:
  	rm -f test_out/*.bgp.gz