All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsepol: fix version comparison when writing policies
@ 2006-10-24 14:44 Darrel Goeddel
  2006-10-24 15:20 ` Stephen Smalley
  0 siblings, 1 reply; 4+ messages in thread
From: Darrel Goeddel @ 2006-10-24 14:44 UTC (permalink / raw)
  To: SELinux List; +Cc: Stephen Smalley, Joshua Brindle, Karl MacMillan

Fix a version comparison that prohibits the "old style" range transition
rules from being written for a version 5 base policy.

---

diff -ruNp --exclude=.svn selinux-base/libsepol/src/write.c selinux/libsepol/src/write.c
--- selinux-base/libsepol/src/write.c	2006-10-24 09:35:46.000000000 -0500
+++ selinux/libsepol/src/write.c	2006-10-24 09:35:13.000000000 -0500
@@ -1641,7 +1641,7 @@ int policydb_write(policydb_t * p, struc
 	if ((p->policyvers >= POLICYDB_VERSION_MLS
 	     && p->policy_type == POLICY_KERN)
 	    || (p->policyvers >= MOD_POLICYDB_VERSION_MLS
-		&& p->policyvers < MOD_POLICYDB_VERSION_MLS
+		&& p->policyvers < MOD_POLICYDB_VERSION_RANGETRANS
 		&& p->policy_type == POLICY_BASE)) {
 		if (range_write(p, fp)) {
 			return POLICYDB_ERROR;
-- 

Darrel

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 14:44 [PATCH] libsepol: fix version comparison when writing policies Darrel Goeddel
2006-10-24 15:20 ` Stephen Smalley
2006-10-24 15:25   ` Joshua Brindle
2006-10-24 18:43     ` Karl MacMillan

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.