audit: Properly set the origin port id of audit messages.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 11 Sep 2012 07:12:29 +0000 (00:12 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 18 Sep 2012 01:06:14 +0000 (18:06 -0700)
For user generated audit messages set the portid field in the netlink
header to the netlink port where the user generated audit message came
from.  Reporting the process id in a port id field was just nonsense.

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/audit.c

index 2a8728fdefc4efd07347ca1a616381f6117b237d..9dd4d0936969fae90108598b322fcc7c87bc5013 100644 (file)
@@ -751,7 +751,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
                                        size--;
                                audit_log_n_untrustedstring(ab, data, size);
                        }
-                       audit_set_pid(ab, pid);
+                       audit_set_pid(ab, NETLINK_CB(skb).pid);
                        audit_log_end(ab);
                }
                break;