diff options
author | Eric Paris <eparis@redhat.com> | 2009-09-12 22:54:10 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-09-13 22:34:07 -0400 |
commit | ed868a56988464cd31de0302426a5e94d3127f10 (patch) | |
tree | cdcd1715445aa19051b6a9a671b39250a449333a /security | |
parent | 86d710146fb9975f04c505ec78caa43d227c1018 (diff) |
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 <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/exports.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) | |||
63 | atomic_dec(&selinux_secmark_refcount); | 63 | atomic_dec(&selinux_secmark_refcount); |
64 | } | 64 | } |
65 | EXPORT_SYMBOL_GPL(selinux_secmark_refcount_dec); | 65 | EXPORT_SYMBOL_GPL(selinux_secmark_refcount_dec); |
66 | |||
67 | bool selinux_is_enabled(void) | ||
68 | { | ||
69 | return selinux_enabled; | ||
70 | } | ||
71 | EXPORT_SYMBOL_GPL(selinux_is_enabled); | ||