Skip to content

Commit

Permalink
Convert all selinux_android_restorecon and _setfilecon calls to new API.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stephensmalley authored and LordNerevar committed Sep 1, 2015
1 parent 1a8d780 commit 41b1b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/jni/android_os_SELinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 41b1b68

Please sign in to comment.