selinux_android_restorecon: log if selinux is disabled am: f8cf22eba8 am: 7acef81958 am: bff9fe164f

Original change: https://android-review.googlesource.com/c/platform/external/selinux/+/2628031

Change-Id: I844493a1abd5a36a47cf0ff7d1b07a1bc2b91865
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Nikita Ioffe 2023-06-16 16:10:38 +00:00 committed by Automerger Merge Worker
commit f684be58ea

View File

@ -633,8 +633,10 @@ static int selinux_android_restorecon_common(const char* pathname_orig,
ftsflags |= FTS_XDEV;
}
if (is_selinux_enabled() <= 0)
if (is_selinux_enabled() <= 0) {
selinux_log(SELINUX_WARNING, "SELinux: SELinux is disabled, skipping restorecon");
return 0;
}
__selinux_once(fc_once, file_context_init);