summaryrefslogtreecommitdiff
path: root/security/selinux
diff options
context:
space:
mode:
authorVenkat Yekkirala <vyekkirala@TrustedCS.com>2006-09-19 10:24:19 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 15:19:04 -0700
commit4eb327b517cf85f6cb7dcd5691e7b748cbe8c343 (patch)
tree51bd92e6b5582a10f21de0d909fb062d6ecf8cce /security/selinux
parent161643660129dd7d98f0b12418c0a2710ffa7db6 (diff)
[SELINUX]: Fix bug in security_sid_mls_copy
The following fixes a bug where random mem is being tampered with in the non-mls case; encountered by Jashua Brindle on a gentoo box. Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/ss/services.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 27ee28ccf266..7eb69a602d8f 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 mls_sid, u32 *new_sid)
u32 len;
int rc = 0;
- if (!ss_initialized) {
+ if (!ss_initialized || !selinux_mls_enabled) {
*new_sid = sid;
goto out;
}