All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: How Audit event triggers in Kernel
Date: Thu, 27 Jan 2011 08:42:45 -0500	[thread overview]
Message-ID: <201101270842.45531.sgrubb@redhat.com> (raw)
In-Reply-To: <AANLkTikRiAonQgRZTLiBA8D=6uUUPDf2e4OESMftHHdG@mail.gmail.com>

On Thursday, January 27, 2011 07:14:40 am Ashok Kumar J wrote:
> I saw the function audit_send in the netlink.c file. This function is used
> to send the audit rules set into kernel. My question is  How Audit event
> triggers for system call in kernel.

The short answer id that there is a rule matcher that checks the current syscall 
against the list of rules.

http://lxr.linux.no/#linux+v2.6.37/kernel/auditfilter.c#L657

In reality, its a little more complicated because you have to get the flow of control 
to this function from syscall entry and exit.

http://lxr.linux.no/#linux+v2.6.37/kernel/auditsc.c#L1562
http://lxr.linux.no/#linux+v2.6.37/kernel/auditsc.c#L1674


> My second question is, After getting the reply packet from the netlink
> socket through the function audit_get_reply(). How the audit log format
> achieved for system call before storing the audit log.

The event does not really get any substantial formatting because the audit daemon's 
job is to dequeue as fast as possible and get it to disk. Any display formatting can 
be done by search and reporting tools. But if you wanted to see it, this is the 
function that takes care of this for the RAW format specified in auditd.conf:

https://fedorahosted.org/audit/browser/trunk/src/auditd-event.c#L963


-Steve

      reply	other threads:[~2011-01-27 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 12:14 How Audit event triggers in Kernel Ashok Kumar J
2011-01-27 13:42 ` Steve Grubb [this message]

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=201101270842.45531.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.