From: Eric W. Biederman Date: Tue, 11 Sep 2012 07:12:29 +0000 (-0700) Subject: audit: Properly set the origin port id of audit messages. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35ce9888ad2a60c95849551e7345bd547714bbff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git audit: Properly set the origin port id of audit messages. 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 Cc: Eric Paris Signed-off-by: "Eric W. Biederman" --- diff --git a/kernel/audit.c b/kernel/audit.c index 2a8728fdefc4..9dd4d0936969 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -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;