forked from osmocom/wireshark
As suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8076 :
Enable PIE (if the compiler supports it) when compiling dumpcap. Do this regardless of whether we're configured to install dumpcap setuid-root because some users will end up running dumpcap as root regardless of how we were configured. svn path=/trunk/; revision=46608
This commit is contained in:
parent
3739c083bf
commit
8a916449e5
|
@ -85,7 +85,7 @@ diameter_DATA = \
|
|||
diameter/Vodafone.xml \
|
||||
diameter/AlcatelLucent.xml \
|
||||
diameter/Nokia.xml \
|
||||
diameter/NokiaSiemensNetworks.xml
|
||||
diameter/NokiaSiemensNetworks.xml
|
||||
|
||||
#
|
||||
# Install the DTDs directory files in the "dtds" subdirectory
|
||||
|
@ -503,7 +503,8 @@ dumpcap_LDADD = \
|
|||
@SYSTEMCONFIGURATION_FRAMEWORKS@ \
|
||||
@COREFOUNDATION_FRAMEWORKS@ \
|
||||
@LIBCAP_LIBS@
|
||||
dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS)
|
||||
dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
|
||||
dumpcap_LDFLAGS = $(PIE_LDFLAGS)
|
||||
|
||||
# Common headers
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
|
||||
|
|
24
configure.ac
24
configure.ac
|
@ -426,6 +426,30 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
|
|||
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
|
||||
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
|
||||
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wold-style-definition, C)
|
||||
|
||||
CFLAGS_before_pie=$CFLAGS
|
||||
AC_WIRESHARK_GCC_CFLAGS_CHECK(-fPIE, C)
|
||||
if test "x$CLFAGS" != "x$CFLAGS_before_pie"
|
||||
then
|
||||
# Restore CFLAGS
|
||||
CFLAGS=$CFLAGS_before_pie
|
||||
|
||||
LDFLAGS_before_pie=$LDFLAGS
|
||||
AC_WIRESHARK_LDFLAGS_CHECK([-pie])
|
||||
if test "x$LDFLAGS" != "x$LDFLAGS_before_pie"
|
||||
then
|
||||
# We can use PIE
|
||||
PIE_CFLAGS="-fPIE"
|
||||
PIE_LDFLAGS="-pie"
|
||||
|
||||
# Restore LDFLAGS
|
||||
LDFLAGS=$LDFLAGS_before_pie
|
||||
fi
|
||||
|
||||
fi
|
||||
AC_SUBST(PIE_CFLAGS)
|
||||
AC_SUBST(PIE_LDFLAGS)
|
||||
|
||||
#
|
||||
# XXX - OK for C++?
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue