From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: creating and inserting audits
Date: Tue, 7 Sep 2010 17:00:27 -0400 [thread overview]
Message-ID: <201009071700.28002.sgrubb@redhat.com> (raw)
In-Reply-To: <43782B27EE6B5749BBC041BF2AD5ACA429EE09DBD3@01AESMX09-1.aes.de.ittind.com>
On Tuesday, September 07, 2010 04:38:29 pm Nestler, Roger - IS wrote:
> Using syslog it seems straight forward to insert a new message , 'syslog
> (LOG_NOTICE, "Hello This is just a notice")' for instance.
>
> Does this capability exist already in linux audit and I'm just not seeing
> it???
The Linux audit system is protected by virtue of apps needing CAP_AUDIT_WRITE
in order to send an event. Assuming that your app has this, you will want to
use one of the functions here:
https://fedorahosted.org/audit/browser/trunk/lib/libaudit.h#L375
> Is it a bad idea to build and then to insert a custom audit/message, or any
> standard audit, into the audit.log file?
Yes. Do not do it. It has to be sent to the kernel for timestamping and
correlation. Not to mention the kernel will collect a few things about the
sender to be put in the audit trail.
> If so are there any problems to look out for , e.g event id/sequence number
> collisions, auparse or ausearch problems, formatting issues to adhere
> to???
You must send to the kernel. Aside from that, events must have a type. If you
do not see a type that matches what you are doing, then use the
AUDIT_TRUSTED_APP type which you may do (nearly) anything to. The audit system
wants name=value fields. You should use the same field name as an existing one
any time you find one. If you are not using AUDIT_TRUSTED_APP, then you must
fill in the same fields in the same order as the original source does. The value
part may not have a space or certain control characters in it. If it does you
must encode the contents of the value with the audit_encode_value() function.
-Steve
next prev parent reply other threads:[~2010-09-07 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 20:38 creating and inserting audits Nestler, Roger - IS
2010-09-07 21:00 ` Steve Grubb [this message]
2010-09-07 21:02 ` LC Bruzenak
2010-09-07 21:17 ` Steve Grubb
2010-09-08 13:48 ` Nestler, Roger - IS
2010-09-08 14:25 ` Steve Grubb
2010-09-08 14:56 ` Nestler, Roger - IS
2010-09-08 20:34 ` 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=201009071700.28002.sgrubb@redhat.com \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
/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