diff options
author | Venkat Yekkirala <vyekkirala@TrustedCS.com> | 2006-09-19 10:24:19 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 15:19:04 -0700 |
commit | 4eb327b517cf85f6cb7dcd5691e7b748cbe8c343 (patch) | |
tree | 51bd92e6b5582a10f21de0d909fb062d6ecf8cce | |
parent | 161643660129dd7d98f0b12418c0a2710ffa7db6 (diff) | |
download | op-kernel-dev-4eb327b517cf85f6cb7dcd5691e7b748cbe8c343.zip op-kernel-dev-4eb327b517cf85f6cb7dcd5691e7b748cbe8c343.tar.gz |
[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>
-rw-r--r-- | security/selinux/ss/services.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 27ee28c..7eb69a6 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; } |