From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ahmed S. Darwish" Subject: [PATCH 4/9] Netlink: Use generic LSM hook Date: Sat, 1 Mar 2008 21:56:22 +0200 Message-ID: <20080301195622.GE19636@ubuntu> References: <20080301194752.GA19636@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20080301194752.GA19636@ubuntu> Sender: linux-security-module-owner@vger.kernel.org To: Chris Wright , Stephen Smalley , James Morris , Eric Paris , Casey Schaufler Cc: LKML , Audit-ML , LSM-ML List-Id: linux-audit@redhat.com Don't use SELinux exported selinux_get_task_sid symbol. Use the generic LSM equivalent instead. Signed-off-by: Casey Schaufler Signed-off-by: Ahmed S. Darwish --- 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 #include #include -#include #include #include @@ -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 -- "Better to light a candle, than curse the darkness" Ahmed S. Darwish Homepage: http://darwish.07.googlepages.com Blog: http://darwish-07.blogspot.com