mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
9c7aa6aa74
commit
e7c3497013
5 changed files with 49 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue