From ed868a56988464cd31de0302426a5e94d3127f10 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Sat, 12 Sep 2009 22:54:10 -0400 Subject: 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 Signed-off-by: James Morris --- security/selinux/exports.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'security') diff --git a/security/selinux/exports.c b/security/selinux/exports.c index c73aeaa008e8..c0a454aee1e0 100644 --- a/security/selinux/exports.c +++ b/security/selinux/exports.c @@ -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); -- cgit v1.2.3-59-g8ed1b