mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Add audit uid to netlink credentials
Most audit control messages are sent over netlink.In order to properly log the identity of the sender of audit control messages, we would like to add the loginuid to the netlink_creds structure, as per the attached patch. Signed-off-by: Serge Hallyn <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
This commit is contained in:
parent
85c8721ff3
commit
c94c257c88
5 changed files with 32 additions and 23 deletions
|
|
@ -905,6 +905,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
|
|||
NETLINK_CB(skb).groups = nlk->groups;
|
||||
NETLINK_CB(skb).dst_pid = dst_pid;
|
||||
NETLINK_CB(skb).dst_groups = dst_groups;
|
||||
NETLINK_CB(skb).loginuid = audit_get_loginuid(current->audit_context);
|
||||
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