From: Burn Alting <burn@swtf.dyndns.org>
To: Wajih Ul Hassan <wajih.lums@gmail.com>, linux-audit@redhat.com
Subject: Re: Send a message to audit.log
Date: Sat, 02 Feb 2019 14:37:27 +1100 [thread overview]
Message-ID: <aa02cabc9a1c7403fd7e8d4d33db596c7b131cd5.camel@swtf.dyndns.org> (raw)
In-Reply-To: <CAH5sRbrFwacgC9Hef_+CCFTctxiUU3tJd0b9cHKWQWWPurCRQQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1152 bytes --]
Wajih,
Try man audit_log_user_messageand note the need for CAP_AUDIT_WRITE ability (see
auditctl(8))
That said. Is there a reason you want a message going into the system kernel logging
mechanism? The only reason why I ask is, if your audit rules posture is aggressive
(many rules that fire) then you could will slow down your application as it waits to
insert a message into the NETLINK_SOCKET is uses.
On *nix, syslog is the normal destination for application event logs. By separating
your application logs from operating system logs, you can more efficiently post
process them.
RegardsOn Fri, 2019-02-01 at 17:03 -0600, Wajih Ul Hassan wrote:
> Hi,
> Hi, I have a C application which needs to send a message to audit.log from
> userspace. I have been using `auditctl -m` format to send a message to audit.log
> using `system` command but it seems to degrade performance a lot of my
> application.
> My question is there any API to send a message programmatically from my
> application which is more efficient and robust.
> Thanks,
> Wajih
>
> --Linux-audit mailing listLinux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit
[-- Attachment #1.2: Type: text/html, Size: 1940 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2019-02-02 3:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 23:03 Send a message to audit.log Wajih Ul Hassan
2019-02-02 3:37 ` Burn Alting [this message]
2019-02-02 10:36 ` 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=aa02cabc9a1c7403fd7e8d4d33db596c7b131cd5.camel@swtf.dyndns.org \
--to=burn@swtf.dyndns.org \
--cc=linux-audit@redhat.com \
--cc=wajih.lums@gmail.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