mirror of
https://github.com/topjohnwu/selinux.git
synced 2025-02-18 18:30:41 +00:00
selinux_android_restorecon: log if selinux is disabled
Right now selinux_android_restorecon will silently succeed if selinux is disabled which is confusing. This change adds a log statement that should help with debugging issues related to disabled selinux (see attached bug). Bug: 284277137 Test: presubmit Change-Id: I4ebc6400ac7188660658ef3cccfb7cbdc76c0f22
This commit is contained in:
parent
e1c842285b
commit
f8cf22eba8
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user