diff options
author | Steve Grubb <sgrubb@redhat.com> | 2005-05-10 13:53:07 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-10 13:53:07 -0400 |
commit | 8c5aa40c94ef8bb7f7da95ecd5942e2d20fc3c9d (patch) | |
tree | 8cda8d1193dfc814a724406cdd0479c7f46c0487 /kernel | |
parent | ea9c102cb0a7969df5733d34f26e0b12c8a3c889 (diff) |
AUDIT: Fix reported length of audit messages.
We were setting nlmsg_len to skb->len, but we should be subtracting
the size of the header.
From: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index b86007da8a3f..2ddd1a2b66d0 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -488,7 +488,7 @@ static inline int audit_log_drain(struct audit_buffer *ab) | |||
488 | 488 | ||
489 | if (audit_pid) { | 489 | if (audit_pid) { |
490 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data; | 490 | struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data; |
491 | nlh->nlmsg_len = skb->len; | 491 | nlh->nlmsg_len = skb->len - sizeof(*nlh); |
492 | skb_get(skb); /* because netlink_* frees */ | 492 | skb_get(skb); /* because netlink_* frees */ |
493 | retval = netlink_unicast(audit_sock, skb, audit_pid, | 493 | retval = netlink_unicast(audit_sock, skb, audit_pid, |
494 | MSG_DONTWAIT); | 494 | MSG_DONTWAIT); |