Browse Source

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 <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Eric W. Biederman 12 years ago
parent
commit
35ce9888ad
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/audit.c

+ 1 - 1
kernel/audit.c

@@ -751,7 +751,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 					size--;
 					size--;
 				audit_log_n_untrustedstring(ab, data, 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);
 			audit_log_end(ab);
 		}
 		}
 		break;
 		break;