From: Paul Moore <paul.moore@hp.com>
To: "Ahmed S. Darwish" <darwish.07@gmail.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
Stephen Smalley <sds@tycho.nsa.gov>,
James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>,
Casey Schaufler <casey@schaufler-ca.com>,
David Woodhouse <dwmw2@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Audit-ML <linux-audit@redhat.com>,
LSM-ML <linux-security-module@vger.kernel.org>
Subject: Re: [PATCH 4/9] Netlink: Use generic LSM hook
Date: Mon, 3 Mar 2008 18:33:27 -0500 [thread overview]
Message-ID: <200803031833.27700.paul.moore@hp.com> (raw)
In-Reply-To: <20080301195622.GE19636@ubuntu>
On Saturday 01 March 2008 2:56:22 pm Ahmed S. Darwish wrote:
> Don't use SELinux exported selinux_get_task_sid symbol.
> Use the generic LSM equivalent instead.
>
> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Reviewed-by: Paul Moore <paul.moore@hp.com>
> ---
>
> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 1ab0da2..61fd277 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -54,7 +54,6 @@
> #include <linux/mm.h>
> #include <linux/types.h>
> #include <linux/audit.h>
> -#include <linux/selinux.h>
> #include <linux/mutex.h>
>
> #include <net/net_namespace.h>
> @@ -1239,7 +1238,7 @@ static int netlink_sendmsg(struct kiocb *kiocb,
> struct socket *sock, NETLINK_CB(skb).pid = nlk->pid;
> NETLINK_CB(skb).dst_group = dst_group;
> NETLINK_CB(skb).loginuid = audit_get_loginuid(current);
> - selinux_get_task_sid(current, &(NETLINK_CB(skb).sid));
> + security_task_getsecid(current, &(NETLINK_CB(skb).sid));
> memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct
> ucred));
>
> /* What can I do? Netlink is asynchronous, so that
--
paul moore
linux security @ hp
next prev parent reply other threads:[~2008-03-03 23:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 19:47 [PATCH-v2 -mm 0/9] LSM-neutral Audit (SELinux audit separation) Ahmed S. Darwish
2008-03-01 19:51 ` [PATCH 1/9] LSM: Introduce inode_getsecid and ipc_getsecid hooks Ahmed S. Darwish
2008-03-03 21:18 ` James Morris
2008-03-03 23:26 ` Paul Moore
2008-03-01 19:52 ` [PATCH 2/9] SELinux: setup new inode/ipc getsecid hooks Ahmed S. Darwish
2008-03-03 21:19 ` James Morris
2008-03-03 23:25 ` Paul Moore
2008-03-01 19:54 ` [PATCH 3/9] Audit: use new LSM hooks instead of SELinux exports Ahmed S. Darwish
2008-03-03 21:19 ` James Morris
2008-03-03 23:31 ` Paul Moore
2008-03-01 19:56 ` [PATCH 4/9] Netlink: Use generic LSM hook Ahmed S. Darwish
2008-03-03 21:19 ` James Morris
2008-03-03 21:30 ` David Miller
2008-03-03 23:33 ` Paul Moore [this message]
2008-03-01 19:58 ` [PATCH 5/9] SELinux: remove redundant exports Ahmed S. Darwish
2008-03-03 21:20 ` James Morris
2008-03-03 23:41 ` Paul Moore
2008-03-01 20:00 ` [PATCH 6/9] LSM/Audit: Introduce generic Audit LSM hooks Ahmed S. Darwish
2008-03-03 21:20 ` James Morris
2008-03-03 23:36 ` Paul Moore
2008-03-01 20:01 ` [PATCH 7/9] Audit: internally use the new LSM audit hooks Ahmed S. Darwish
2008-03-03 21:20 ` James Morris
2008-03-03 23:51 ` Paul Moore
2008-03-04 3:31 ` Ahmed S. Darwish
2008-03-04 4:09 ` James Morris
2008-03-04 4:15 ` James Morris
2008-03-01 20:03 ` [PATCH 8/9] SELinux: use new audit hooks, remove redundant exports Ahmed S. Darwish
2008-03-03 21:20 ` James Morris
2008-03-01 20:05 ` [PATCH 9/9] Audit: Final renamings and cleanup Ahmed S. Darwish
2008-03-03 21:21 ` James Morris
2008-03-05 5:29 ` [PATCH-v2 -mm 0/9] LSM-neutral Audit (SELinux audit separation) James Morris
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=200803031833.27700.paul.moore@hp.com \
--to=paul.moore@hp.com \
--cc=akpm@linux-foundation.org \
--cc=casey@schaufler-ca.com \
--cc=chrisw@sous-sol.org \
--cc=darwish.07@gmail.com \
--cc=dwmw2@infradead.org \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
/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 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).