aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorVenkat Yekkirala <vyekkirala@TrustedCS.com>2006-09-19 13:24:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:19:04 -0400
commit4eb327b517cf85f6cb7dcd5691e7b748cbe8c343 (patch)
tree51bd92e6b5582a10f21de0d909fb062d6ecf8cce /security
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')
-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)
1841 u32 len; 1841 u32 len;
1842 int rc = 0; 1842 int rc = 0;
1843 1843
1844 if (!ss_initialized) { 1844 if (!ss_initialized || !selinux_mls_enabled) {
1845 *new_sid = sid; 1845 *new_sid = sid;
1846 goto out; 1846 goto out;
1847 } 1847 }