All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsepol users in non-mls policy bugfix
@ 2006-10-30 13:59 Joshua Brindle
  2006-10-30 18:26 ` Karl MacMillan
  0 siblings, 1 reply; 8+ messages in thread
From: Joshua Brindle @ 2006-10-30 13:59 UTC (permalink / raw)
  To: selinux@tycho.nsa.gov; +Cc: Stephen Smalley, Karl MacMillan, Darrel Goeddel

This patch fixes a bug where adding a user in a non-mls module would
cause a segfault at link time.


diff -pruN trunk/libsepol/src/link.c user_mls_fix/libsepol/src/link.c
--- trunk/libsepol/src/link.c	2006-10-28 15:35:26.000000000 -0400
+++ user_mls_fix/libsepol/src/link.c	2006-10-28 15:26:44.000000000 -0400
@@ -994,11 +994,15 @@ static int user_fix_callback(hashtab_key
 		goto cleanup;
 	}
 
-	if (mls_range_convert(&user->range, &new_user->range, mod))
-		goto cleanup;
+	if (mod->policy->mls) {
 
-	if (mls_level_convert(&user->dfltlevel, &new_user->dfltlevel, mod))
-		goto cleanup;
+		if (mls_range_convert(&user->range, &new_user->range, mod))
+			goto cleanup;
+
+		if (mls_level_convert(&user->dfltlevel, &new_user->dfltlevel, mod))
+			goto cleanup;
+
+	}
 
 	return 0;
 



--
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] 8+ messages in thread

end of thread, other threads:[~2006-10-31 18:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-30 13:59 [PATCH] libsepol users in non-mls policy bugfix Joshua Brindle
2006-10-30 18:26 ` Karl MacMillan
2006-10-30 18:31   ` Joshua Brindle
2006-10-30 18:52     ` Darrel Goeddel
2006-10-30 18:56     ` Karl MacMillan
2006-10-30 21:41       ` Joshua Brindle
2006-10-31 18:03         ` Stephen Smalley
2006-10-31 18:40           ` Joshua Brindle

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.