From 41b1b6845b41c9b8aff91726b96c78f4d3e04c90 Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Fri, 7 Feb 2014 09:16:12 -0500 Subject: [PATCH] Convert all selinux_android_restorecon and _setfilecon calls to new API. libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley --- core/jni/android_os_SELinux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp index ca278cf00d4f..db818d1b2843 100644 --- a/core/jni/android_os_SELinux.cpp +++ b/core/jni/android_os_SELinux.cpp @@ -415,7 +415,7 @@ static jboolean native_restorecon(JNIEnv *env, jobject, jstring pathnameStr) { return false; } - int ret = selinux_android_restorecon(pathname.c_str()); + int ret = selinux_android_restorecon(pathname.c_str(), 0); ALOGV("restorecon(%s) => %d", pathname.c_str(), ret); return (ret == 0); }