Messages in this thread Patch in this message | | | Subject | [patch 1/1] selinux: fix bug in security_compute_sid | From | Stephen Smalley <> | Date | Tue, 25 Jul 2006 10:13:36 -0400 |
| |
From: Venkat Yekkirala <vyekkirala@trustedcs.com>
Initializes newcontext sooner to allow for its destruction in all cases. Please apply for 2.6.18.
Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
security/selinux/ss/services.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff -X /home/sds/dontdiff -rup linux-2.6.18-rc2-git2/security/selinux/ss/services.c linux-2.6.18-rc2-git2-x/security/selinux/ss/services.c --- linux-2.6.18-rc2-git2/security/selinux/ss/services.c 2006-07-24 11:25:49.000000000 -0400 +++ linux-2.6.18-rc2-git2-x/security/selinux/ss/services.c 2006-07-25 08:11:58.000000000 -0400 @@ -833,6 +833,8 @@ static int security_compute_sid(u32 ssid goto out; } + context_init(&newcontext); + POLICY_RDLOCK; scontext = sidtab_search(&sidtab, ssid); @@ -850,8 +852,6 @@ static int security_compute_sid(u32 ssid goto out_unlock; } - context_init(&newcontext); - /* Set the user identity. */ switch (specified) { case AVTAB_TRANSITION: -- Stephen Smalley National Security Agency
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |