From: Ondrej Zary <linux@rainbow-software.org>
To: linux-kernel@vger.kernel.org
Subject: [patch] Syscall auditing - move "name=" field to the end
Date: Wed, 16 Mar 2005 22:34:20 +0100 [thread overview]
Message-ID: <4238A65C.7020908@rainbow-software.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
This patch moves the "name=" field to the end of audit records. The
original placement is bad because it cannot be properly parsed. It is
impossible to tell if the name is "/bin/true" or "/bin/true inode=469634
dev=00:00" because the "inode=" and "dev=" fields can be omitted.
Before:
audit(1111008486.824:89346): item=0 name=/bin/true inode=469634 dev=00:00
After:
audit(1111008486.824:89346): item=0 inode=469634 dev=00:00 name=/bin/true
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
--
Ondrej Zary
[-- Attachment #2: auditsc_move_name_to_end_of_record.patch --]
[-- Type: text/plain, Size: 750 bytes --]
--- linux-2.6.11/kernel/auditsc.c~ 2005-03-16 22:13:22.000000000 +0100
+++ linux-2.6.11/kernel/auditsc.c 2005-03-16 22:13:22.000000000 +0100
@@ -612,9 +612,6 @@
if (!ab)
continue; /* audit_panic has been called */
audit_log_format(ab, "item=%d", i);
- if (context->names[i].name)
- audit_log_format(ab, " name=%s",
- context->names[i].name);
if (context->names[i].ino != (unsigned long)-1)
audit_log_format(ab, " inode=%lu",
context->names[i].ino);
@@ -624,6 +621,9 @@
audit_log_format(ab, " dev=%02x:%02x",
MAJOR(context->names[i].rdev),
MINOR(context->names[i].rdev));
+ if (context->names[i].name)
+ audit_log_format(ab, " name=%s",
+ context->names[i].name);
audit_log_end(ab);
}
}
next reply other threads:[~2005-03-16 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 21:34 Ondrej Zary [this message]
2005-03-16 22:41 ` [patch] Syscall auditing - move "name=" field to the end Chris Wright
2005-03-17 2:25 ` David Woodhouse
2005-03-17 17:57 ` Chris Wright
2005-03-17 18:37 ` Steve Grubb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4238A65C.7020908@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox