From: Paul Moore <paul.moore@hp.com>
To: Venkat Yekkirala <vyekkirala@TrustedCS.com>
Cc: selinux@tycho.nsa.gov, jmorris@namei.org, sds@tycho.nsa.gov,
eparis@redhat.com, jbrindle@tresys.com, redhat-lspp@redhat.com
Subject: Re: [PATCH 1/1] selinux: secid reconciliation fixes V02
Date: Mon, 09 Oct 2006 12:48:34 -0400 [thread overview]
Message-ID: <452A7D62.4030006@hp.com> (raw)
In-Reply-To: <452A6A2F.3040202@trustedcs.com>
FYI: some changes need to be made to avoid compilation warnings (see below, and
selinux_ip_postroute_last() to see what I mean), I'm taking the liberty of
changing the patch myself.
Venkat Yekkirala wrote:
> -static int selinux_skb_flow_out(struct sk_buff *skb, u32 nf_secid)
> +static int selinux_skb_flow_out(struct sk_buff *skb, u32 nf_secid,
> + const struct net_device *out, unsigned short family)
> {
> int err;
> + char *addrp;
> + int len;
> + struct avc_audit_data ad;
Add the following:
struct net_device *dev = (struct net_device *)out;
> if (selinux_compat_net)
> return 1;
> @@ -3738,9 +3749,17 @@ static int selinux_skb_flow_out(struct s
> }
> }
>
> + AVC_AUDIT_DATA_INIT(&ad, NET);
> + ad.u.net.netif = out->name;
Replace the above line with:
ad.u.net.netif = dev->name;
> + ad.u.net.family = family;
> + err = selinux_parse_skb(skb, &ad, &addrp, &len, 0);
> + if (err)
> + goto out;
> +
> err = avc_has_perm(skb->secmark, nf_secid, SECCLASS_PACKET,
> - PACKET__FLOW_OUT, NULL);
> + PACKET__FLOW_OUT, &ad);
>
> +out:
> return err ? 0 : 1;
> }
--
paul moore
linux security @ hp
--
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.
next prev parent reply other threads:[~2006-10-09 16:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 15:26 [PATCH 1/1] selinux: secid reconciliation fixes V02 Venkat Yekkirala
2006-10-09 15:51 ` Paul Moore
2006-10-09 16:48 ` Paul Moore [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-09 16:01 Venkat Yekkirala
2006-10-09 16:12 ` Paul Moore
2006-10-09 16:51 Venkat Yekkirala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=452A7D62.4030006@hp.com \
--to=paul.moore@hp.com \
--cc=eparis@redhat.com \
--cc=jbrindle@tresys.com \
--cc=jmorris@namei.org \
--cc=redhat-lspp@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=vyekkirala@TrustedCS.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.