Creds: creds->security can be NULL is selinux is disabled

__validate_process_creds should check if selinux is actually enabled before
running tests on the selinux portion of the credentials struct.

Signed-off-by: Eric Paris <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
Eric Paris 2009-09-12 22:54:10 -04:00 • committed by James Morris
commit ed868a5698
3 changed files with 23 additions and 5 deletions

View file

@ -63,3 +63,9 @@ void selinux_secmark_refcount_dec(void)
atomic_dec(&selinux_secmark_refcount);
}
EXPORT_SYMBOL_GPL(selinux_secmark_refcount_dec);
bool selinux_is_enabled(void)
{
return selinux_enabled;
}
EXPORT_SYMBOL_GPL(selinux_is_enabled);