aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Martuccelli <peterm@redhat.com>2005-01-11 03:17:55 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 03:17:55 -0800
commit88464d1b5a18ba983f6721c9b473215d2a0a6341 (patch)
treedbe0140abe673945982bda98c6b1497b8f9b44b3 /kernel
parent46ce12e00886edc7a504d7d2da199216c98c32b0 (diff)
downloadhistory-88464d1b5a18ba983f6721c9b473215d2a0a6341.tar.gz
[PATCH] audit return code and log format fix
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 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> Signed-off-by: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Roger Luethi <rl@hellgate.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c2
-rw-r--r--kernel/auditsc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 8ec8a88ad35c37..e21f947bacf26c 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -419,7 +419,7 @@ static int audit_receive_skb(struct sk_buff *skb)
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 --git a/kernel/auditsc.c b/kernel/auditsc.c
index 0962944e8357bc..aa617bbe49b07e 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -591,7 +591,7 @@ static void audit_log_exit(struct audit_context *context)
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"