Messages in this thread Patch in this message | | | Date | Mon, 10 Jan 2005 14:43:18 -0500 | From | Peter Martuccelli <> | Subject | [PATCH 2.6.10] audit return code and log format fix |
| |
Hello Andrew,
A couple of one liners to resolve two issues that have come up regarding audit. Roger reported a problem with audit.c:audit_receive_skb which improperly negates the errno argument when netlink_ack is called. The second issue was reported by Steve on the linux-audit list, auditsc.s:audit_log_exit using %u instead of %d in the audit_log_format call.
Please incorporate the patch in the next version.
Please note, there is a mailing list available for audit discussion at https://www.redhat.com/archives/linux-audit/
Signed-off-by: Peter Martuccelli <peterm@redhat.com> Steve Grubb <sgrubb@redhat.com> Roger Luethi <rl@hellgate.ch>
Regards,
Peter
diffstat: audit.c | 2 +- auditsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff -Naurp linux-2.6.10-pristine/kernel/audit.c linux-2.6.10/kernel/audit.c --- linux-2.6.10-pristine/kernel/audit.c 2004-12-24 16:35:50.000000000 -0500 +++ linux-2.6.10/kernel/audit.c 2005-01-07 15:37:22.329915776 -0500 @@ -419,7 +419,7 @@ static int audit_receive_skb(struct sk_b if (rlen > skb->len) rlen = skb->len; if ((err = audit_receive_msg(skb, nlh))) { - netlink_ack(skb, nlh, -err); + netlink_ack(skb, nlh, err); } else if (nlh->nlmsg_flags & NLM_F_ACK) netlink_ack(skb, nlh, 0); skb_pull(skb, rlen); diff -Naurp linux-2.6.10-pristine/kernel/auditsc.c linux-2.6.10/kernel/auditsc.c --- linux-2.6.10-pristine/kernel/auditsc.c 2004-12-24 16:35:24.000000000 -0500 +++ linux-2.6.10/kernel/auditsc.c 2005-01-07 15:37:17.675623336 -0500 @@ -591,7 +591,7 @@ static void audit_log_exit(struct audit_ if (context->personality != PER_LINUX) audit_log_format(ab, " per=%lx", context->personality); if (context->return_valid) - audit_log_format(ab, " exit=%u", context->return_code); + audit_log_format(ab, " exit=%d", context->return_code); audit_log_format(ab, " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" " pid=%d loginuid=%d uid=%d gid=%d" - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |