diff options
author | Serge Hallyn <serue@us.ibm.com> | 2005-04-29 11:27:17 -0400 |
---|---|---|
committer | <dwmw2@shinybook.infradead.org> | 2005-04-29 11:27:17 -0400 |
commit | c94c257c88c517f251da273a15c654224c7b6e21 (patch) | |
tree | 992dd50f6bb13a70b04450cdfe0dbfb3c7b17ef5 /net/netlink/af_netlink.c | |
parent | 85c8721ff3bc96b702427a440616079e8daf8a2f (diff) |
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>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r-- | net/netlink/af_netlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 29a5fd231eac..cb64cff3e339 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -905,6 +905,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock, | |||
905 | NETLINK_CB(skb).groups = nlk->groups; | 905 | NETLINK_CB(skb).groups = nlk->groups; |
906 | NETLINK_CB(skb).dst_pid = dst_pid; | 906 | NETLINK_CB(skb).dst_pid = dst_pid; |
907 | NETLINK_CB(skb).dst_groups = dst_groups; | 907 | NETLINK_CB(skb).dst_groups = dst_groups; |
908 | NETLINK_CB(skb).loginuid = audit_get_loginuid(current->audit_context); | ||
908 | memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred)); | 909 | memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred)); |
909 | 910 | ||
910 | /* What can I do? Netlink is asynchronous, so that | 911 | /* What can I do? Netlink is asynchronous, so that |