Move tcpdump to /system/xbin (instead of /system/bin),
authorDan Egnor <egnor@google.com>
Fri, 15 May 2009 19:43:43 +0000 (12:43 -0700)
committerDan Egnor <egnor@google.com>
Fri, 15 May 2009 19:43:43 +0000 (12:43 -0700)
and configure it to shed privileges by default (if running as root)
after binding the socket needed to sniff with.

Android.mk
config.h

index 0985b109bb4e8437a7000c484f17fd57a66ce4e0..ad47230cbe6fee977681f2c06db26896f7179932 100644 (file)
@@ -119,20 +119,22 @@ LOCAL_SRC_FILES:=\
        missing/strlcat.c\
        missing/strlcpy.c
 
-LOCAL_CFLAGS:=-O2 -g
-LOCAL_CFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((unused))"
+LOCAL_CFLAGS := -O2 -g
+LOCAL_CFLAGS += -DHAVE_CONFIG_H -D_U_="__attribute__((unused))"
 
-LOCAL_C_INCLUDES+=\
+LOCAL_C_INCLUDES += \
        $(LOCAL_PATH)/missing\
        external/openssl/include\
        external/libpcap
 
-LOCAL_SHARED_LIBRARIES+=libssl
+LOCAL_SHARED_LIBRARIES += libssl
 
-LOCAL_STATIC_LIBRARIES+=libpcap
+LOCAL_STATIC_LIBRARIES += libpcap
 
-LOCAL_MODULE_TAGS:=tests
+LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
 
-LOCAL_MODULE:=tcpdump
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_MODULE := tcpdump
 
 include $(BUILD_EXECUTABLE)
index 76ba53b0a2e095f404e49b34054505b5c5a52806..6cc6d759cbb397bde5472ee67ca71a69c635c44e 100644 (file)
--- a/config.h
+++ b/config.h
 /* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
 
 /* define if should drop privileges by default */
-/* #undef WITH_USER */
+#define WITH_USER "shell"
 
 /* define if should chroot when dropping privileges */
 /* #undef WITH_CHROOT */