netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] NetLabel: patch against Venkat's secid patchset
@ 2006-09-29 20:17 paul.moore
  2006-09-29 20:17 ` [PATCH 1/1] NetLabel: secid reconciliation support paul.moore
  0 siblings, 1 reply; 4+ messages in thread
From: paul.moore @ 2006-09-29 20:17 UTC (permalink / raw)
  To: vyekkirala, netdev, selinux; +Cc: jmorris, sds, method, kmacmillan

The following patch is against this morning's net-2.6 tree with Venkat's secid patches applied.  You may notice some differences as I had to fuzz/fix-up Venkat's patches in a few places.

This patch provides the missing NetLabel support for the secid reconciliation patches based on the discussions we have been having on the mailing lists.  Ideally I would hope Venkat could merge this patch in with his patchset so that the secid patchset will include NetLabel support.  However, if that is not possibile I'll respin this patch later once the secid patches have been committed.

Venkat, please merge this patch into your next version of the secid patches.

--
paul moore
linux security @ hp

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [PATCH 1/1] NetLabel: secid reconciliation support
@ 2006-09-29 21:20 Venkat Yekkirala
  2006-09-29 21:49 ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Venkat Yekkirala @ 2006-09-29 21:20 UTC (permalink / raw)
  To: paul.moore, netdev, selinux; +Cc: jmorris, sds, method, kmacmillan

> @@ -3672,16 +3674,20 @@ static int selinux_skb_flow_in(struct sk
>  	if (err)
>  		goto out;
>  
> -	if (xfrm_sid) {
> -		err = security_transition_sid(xfrm_sid, skb->secmark,
> -						
> SECCLASS_PACKET, &trans_sid);
> -		if (err)
> -			goto out;
> +	if (xfrm_sid)
> +		skb->secmark = xfrm_sid;
>  
> -		skb->secmark = trans_sid;
> -	}
> +	err = selinux_netlbl_skb_sid(skb, skb->secmark, &nlbl_sid);

I take it nlbl_sid here will be 0 if netlabel is NOT configured
for the traffic correct?

> --- net-2.6.orig/security/selinux/ss/mls.c
> +++ net-2.6/security/selinux/ss/mls.c
> @@ -547,7 +547,7 @@ int mls_compute_sid(struct context *scon
>  				                     
&rtr->target_range);
>  			}
>  		}
> -		else if (tclass == SECCLASS_PACKET)
> +		if (tclass == SECCLASS_PACKET)

What's the purpose of getting rid of "else" above?

I haven't reviewed the netlbl native changes, but the hooks.c changes
seem ok to me.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-29 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-29 20:17 [PATCH 0/1] NetLabel: patch against Venkat's secid patchset paul.moore
2006-09-29 20:17 ` [PATCH 1/1] NetLabel: secid reconciliation support paul.moore
  -- strict thread matches above, loose matches on Subject: below --
2006-09-29 21:20 Venkat Yekkirala
2006-09-29 21:49 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).