Skip to content

Commit 41b1b68

Browse files
stephensmalleyLordNerevar
authored andcommitted
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 <sds@tycho.nsa.gov>
1 parent 1a8d780 commit 41b1b68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/jni/android_os_SELinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static jboolean native_restorecon(JNIEnv *env, jobject, jstring pathnameStr) {
415415
return false;
416416
}
417417

418-
int ret = selinux_android_restorecon(pathname.c_str());
418+
int ret = selinux_android_restorecon(pathname.c_str(), 0);
419419
ALOGV("restorecon(%s) => %d", pathname.c_str(), ret);
420420
return (ret == 0);
421421
}

0 commit comments

Comments
 (0)