summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSteve Grubb <sgrubb@redhat.com>2006-04-03 09:08:13 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-05-01 06:09:58 -0400
commite7c3497013a7e5496ce3d5fd3c73b5cf5af7a56e (patch)
tree2a57da5e958011b300256988e414387b1455660c /net
parent9c7aa6aa74fa8a5cda36e54cbbe4fffe0214497d (diff)
downloadop-kernel-dev-e7c3497013a7e5496ce3d5fd3c73b5cf5af7a56e.zip
op-kernel-dev-e7c3497013a7e5496ce3d5fd3c73b5cf5af7a56e.tar.gz
[PATCH] Reworked patch for labels on user space messages
The below patch should be applied after the inode and ipc sid patches. This patch is a reworking of Tim's patch that has been updated to match the inode and ipc patches since its similar. [updated: > Stephen Smalley also wanted to change a variable from isec to tsec in the > user sid patch. ] Signed-off-by: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/netlink/af_netlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 2a233ff..09fbc4b 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -56,6 +56,7 @@
#include <linux/mm.h>
#include <linux/types.h>
#include <linux/audit.h>
+#include <linux/selinux.h>
#include <net/sock.h>
#include <net/scm.h>
@@ -1157,6 +1158,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
NETLINK_CB(skb).dst_pid = dst_pid;
NETLINK_CB(skb).dst_group = dst_group;
NETLINK_CB(skb).loginuid = audit_get_loginuid(current->audit_context);
+ selinux_get_task_sid(current, &(NETLINK_CB(skb).sid));
memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
/* What can I do? Netlink is asynchronous, so that
OpenPOWER on IntegriCloud