All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] security_compute_sid: minor bug fix
@ 2006-07-17 15:26 Venkat Yekkirala
  0 siblings, 0 replies; only message in thread
From: Venkat Yekkirala @ 2006-07-17 15:26 UTC (permalink / raw)
  To: selinux, sds

Initializes newcontext sooner to allow for its destruction in all cases.

Signed-off-by: Venkat Yekkirala <vyekkirala@TrustedCS.com>
---

--- linux-2.6.17.vanilla/security/selinux/ss/services.c	2006-07-14 09:28:40.000000000 -0500
+++ linux-2.6.17/security/selinux/ss/services.c	2006-07-17 10:12:29.000000000 -0500
@@ -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:

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-07-17 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-17 15:26 [PATCH] security_compute_sid: minor bug fix Venkat Yekkirala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.