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

* Re: [PATCH] libsepol: fix version comparison when writing policies
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Smalley @ 2006-10-24 15:20 UTC (permalink / raw)
  To: Darrel Goeddel; +Cc: SELinux List, Joshua Brindle, Karl MacMillan

On Tue, 2006-10-24 at 09:44 -0500, Darrel Goeddel wrote:
> 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;

Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>

-- 
Stephen Smalley
National Security Agency


--
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

* Re: [PATCH] libsepol: fix version comparison when writing policies
  2006-10-24 15:20 ` Stephen Smalley
@ 2006-10-24 15:25   ` Joshua Brindle
  2006-10-24 18:43     ` Karl MacMillan
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Brindle @ 2006-10-24 15:25 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Darrel Goeddel, SELinux List, Karl MacMillan

On Tue, 2006-10-24 at 11:20 -0400, Stephen Smalley wrote:
> On Tue, 2006-10-24 at 09:44 -0500, Darrel Goeddel wrote:
> > 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;
> 
> Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
> 

Acked-by: Joshua Brindle <jbrindle@tresys.com>




--
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

* Re: [PATCH] libsepol: fix version comparison when writing policies
  2006-10-24 15:25   ` Joshua Brindle
@ 2006-10-24 18:43     ` Karl MacMillan
  0 siblings, 0 replies; 4+ messages in thread
From: Karl MacMillan @ 2006-10-24 18:43 UTC (permalink / raw)
  To: Joshua Brindle; +Cc: Stephen Smalley, Darrel Goeddel, SELinux List

On Tue, 2006-10-24 at 11:25 -0400, Joshua Brindle wrote:
> On Tue, 2006-10-24 at 11:20 -0400, Stephen Smalley wrote:
> > On Tue, 2006-10-24 at 09:44 -0500, Darrel Goeddel wrote:
> > > 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;
> > 
> > Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
> > 
> 
> Acked-by: Joshua Brindle <jbrindle@tresys.com>
> 
> 

Acked-by: Karl MacMillan <kmacmill@mentalrootkit.com>



--
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.