All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Chris Wright <chrisw@osdl.org>,
	netdev@oss.sgi.com, davem@davemloft.net,
	James Morris <jmorris@redhat.com>,
	"Serge E. Hallyn" <serue@us.ibm.com>
Subject: Re: [RFC][PATCH 1/3] netlink check sender
Date: Mon, 14 Feb 2005 16:17:38 -0800	[thread overview]
Message-ID: <20050215001738.GC27645@shell0.pdx.osdl.net> (raw)
In-Reply-To: <1108385999.15437.18.camel@moss-spartans.epoch.ncsc.mil>

* Stephen Smalley (sds@epoch.ncsc.mil) wrote:
> On Sat, 2005-02-12 at 04:02, Chris Wright wrote:
> > ===== net/netlink/af_netlink.c 1.69 vs edited =====
> > --- 1.69/net/netlink/af_netlink.c	2005-01-21 12:25:32 -08:00
> > +++ edited/net/netlink/af_netlink.c	2005-02-11 18:05:59 -08:00
> >  int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol)
> >  {
> >  	struct netlink_opt *nlk;
> > -	int len = skb->len;
> > -
> > +	int err, len = skb->len;
> > +	
> >  	nlk = nlk_sk(sk);
> > +
> > +	printk("%s: %s(%d) send_check %p\n", __FUNCTION__, current->comm, current->pid, nlk->check_sender);
> > +	if (nlk->check_sender)
> > +		if ((err = nlk->check_sender(skb))) {
> > +			netlink_detachskb(sk, skb);
> > +			return err;
> > +		}
> > +
> 
> printk() is a leftover from debugging, I assume.  

Heh, yeah, just leftover gargabe.

> Why place the check_sender() call here vs. just replacing the existing
> security_netlink_send() call in netlink_sendmsg() with this new call?

That's fine, however it needs to be this late, to get the receiver looked up.
I think the sk would change in _send hook, so for RFC, I just left them
separate.  Ideal would be complete consolidation.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

      parent reply	other threads:[~2005-02-15  0:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-12  9:01 [RFC][PATCH 0/3] netlink check sender Chris Wright
2005-02-12  9:02 ` [RFC][PATCH 1/3] " Chris Wright
2005-02-12  9:05   ` [RFC][PATCH 2/3] netlink check sender, audit Chris Wright
2005-02-12  9:06     ` [RFC][PATCH 3/3] netlink check sender, rtnetlink Chris Wright
2005-02-12 16:48     ` [RFC][PATCH 2/3] netlink check sender, audit Pablo Neira
2005-02-12 21:41       ` Pablo Neira
2005-02-14 13:08         ` Stephen Smalley
2005-02-15  0:13         ` Chris Wright
2005-02-15  2:29           ` Pablo Neira
2005-02-15  2:36             ` Pablo Neira
2005-02-15  3:47             ` Chris Wright
2005-02-15 22:19               ` Pablo Neira
2005-02-15 22:22                 ` Chris Wright
2005-02-15 22:27                   ` Pablo Neira
2005-02-16  0:11                     ` Chris Wright
2005-02-16  3:42                       ` James Morris
2005-02-15  0:11       ` Chris Wright
2005-02-14 12:59   ` [RFC][PATCH 1/3] netlink check sender Stephen Smalley
2005-02-14 13:05     ` Stephen Smalley
2005-02-15  0:22       ` Chris Wright
2005-02-15  0:17     ` Chris Wright [this message]

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=20050215001738.GC27645@shell0.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=sds@epoch.ncsc.mil \
    --cc=serue@us.ibm.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.