Use selinux_android_setcon() instead of setcon()
Bug 26114086
Change-Id: I02d20ee7a5f487fc73d7a33d50b0b8f1cd9ad3a4
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 240985f..53117d6 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -29,7 +29,7 @@
#include <android-base/stringprintf.h>
#include "cutils/properties.h"
#include "private/android_filesystem_config.h"
-#include "selinux/selinux.h"
+#include "selinux/android.h"
#include "adb.h"
#include "adb_auth.h"
@@ -137,7 +137,7 @@
D("Local port disabled");
} else {
if (root_seclabel != nullptr) {
- if (setcon(root_seclabel) < 0) {
+ if (selinux_android_setcon(root_seclabel) < 0) {
LOG(FATAL) << "Could not set SELinux context";
}
}