summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.se>2014-06-17 10:23:14 +0100
committerThomas Habets <thomas@habets.se>2014-06-17 10:23:14 +0100
commit8fd8171def7f033d50cce443dc91587bdfca3d28 (patch)
treeda91786554fc9e7c9287ee08c03f9e6f69b0f87c /configure.ac
parent4eb0c7b508e7764b5ba3067a083fc2e65595e7e1 (diff)
downloadarping-8fd8171def7f033d50cce443dc91587bdfca3d28.tar.gz
Drop privileges, where possible.
Fixes #9.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 26c7cc4..d96a9d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@ AC_PROG_MAKE_SET
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([socket], [socket])
AC_CHECK_LIB([nsl], [gethostbyname])
+AC_CHECK_LIB([cap], [cap_init])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_LIB([net], [libnet_name_resolve],
[AC_MSG_ERROR([libnet 1.0.x found. Arping 2.x requires libnet 1.1.x])])
@@ -36,10 +37,12 @@ sys/socket.h \
time.h \
sys/time.h \
sys/types.h \
+sys/capability.h \
stdint.h \
libnet.h \
win32/libnet.h \
net/bpf.h \
+pwd.h \
unistd.h])
# Libnet include file is not optional
@@ -62,7 +65,7 @@ AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([gettimeofday memset select strchr strdup strerror strstr \
-getifaddrs])
+getifaddrs cap_init])
if test x$ac_cv_func_getifaddrs = xyes; then
AC_LIBOBJ([findif_getifaddrs])