summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2016-08-30 10:49:13 (GMT)
committer Tellen Yu <tellen.yu@amlogic.com>2016-08-30 10:49:13 (GMT)
commitf307ba7f594110b0a41533f428b0bbb303394068 (patch)
tree57fc9d726f5461472e6db8c8fa7f1e5e4b11440d
parent7a175ae4f9a12dc3a74c167dcb34ed1eef03eca0 (diff)
downloadpppoe-f307ba7f594110b0a41533f428b0bbb303394068.zip
pppoe-f307ba7f594110b0a41533f428b0bbb303394068.tar.gz
pppoe-f307ba7f594110b0a41533f428b0bbb303394068.tar.bz2
modify for Nougat bringup
Change-Id: Ie5278044aabbf34789caacbfb7a64a72dc7a742d
Diffstat
-rw-r--r--Android.mk11
-rw-r--r--jni/src/netwrapper.c6
2 files changed, 14 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index af64a85..1cddb5e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -29,6 +29,9 @@ LOCAL_SRC_FILES := jni/src/pppoe.c \
jni/src/discovery.c \
jni/src/netwrapper.c
#LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
+LOCAL_C_INCLUDES += external/selinux/libselinux/include/ \
+ external/selinux/libselinux/src
+
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MODULE = pppoe
LOCAL_MODULE_TAGS := optional
@@ -50,6 +53,8 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_SHARED_LIBRARIES += libandroid_runtime libnativehelper
LOCAL_SHARED_LIBRARIES += libc libcutils libnetutils
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE) $(LOCAL_PATH)/jni/src
+LOCAL_C_INCLUDES += external/selinux/libselinux/include/ \
+ external/selinux/libselinux/src
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libpppoejni
LOCAL_PRELINK_MODULE := false
@@ -61,6 +66,9 @@ LOCAL_SRC_FILES:= jni/src/pppoe_cli.c \
jni/src/common.c \
jni/src/netwrapper.c
+LOCAL_C_INCLUDES += external/selinux/libselinux/include/ \
+ external/selinux/libselinux/src
+
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := pcli
LOCAL_SHARED_LIBRARIES := libcutils libnetutils libselinux
@@ -77,6 +85,9 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include
+LOCAL_C_INCLUDES += external/selinux/libselinux/include/ \
+ external/selinux/libselinux/src
+
LOCAL_CFLAGS := -DANDROID_CHANGES
LOCAL_MODULE_TAGS := optional
diff --git a/jni/src/netwrapper.c b/jni/src/netwrapper.c
index 1622d49..dd62e65 100644
--- a/jni/src/netwrapper.c
+++ b/jni/src/netwrapper.c
@@ -38,7 +38,7 @@
#include <sys/un.h>
#include <selinux/label.h>
-#include <selinux/android.h>
+//#include <selinux/label_internal.h>
#include <cutils/sockets.h>
@@ -80,7 +80,7 @@ struct netwrapper_ctrl * netwrapper_ctrl_open
int tries = 0;
struct stat buf;
uid_t uid,euid;
- sehandle = selinux_android_file_context_handle();
+ //sehandle = selinux_android_file_context_handle();
ctrl = malloc(sizeof(*ctrl));
if (ctrl == NULL)
return NULL;
@@ -263,7 +263,7 @@ int netwrapper_main(const char *server_path)
int i, len, clilen = 0;
int ret;
char *filecon;
- sehandle = selinux_android_file_context_handle();
+ //sehandle = selinux_android_file_context_handle();
socket_fd = socket(PF_UNIX, SOCK_DGRAM, 0);
if (socket_fd < 0) {
__android_log_print(ANDROID_LOG_ERROR, LOCAL_TAG,