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 <serue@us.ibm.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user