Skip to content

Commit

Permalink
Netlink: Use generic LSM hook
Browse files Browse the repository at this point in the history
Don't use SELinux exported selinux_get_task_sid symbol.
Use the generic LSM equivalent instead.

Signed-off-by: Casey Schaufler <[email protected]>
Signed-off-by: Ahmed S. Darwish <[email protected]>
Acked-by: James Morris <[email protected]>
Acked-by: David S. Miller <[email protected]>
Reviewed-by: Paul Moore <[email protected]>
  • Loading branch information
a-darwish authored and James Morris committed Apr 18, 2008
1 parent 2a862b3 commit 0ce784c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0ce784c

Please sign in to comment.