All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: audit_send function in netlink socket
Date: Wed, 19 Jan 2011 08:40:24 -0500	[thread overview]
Message-ID: <201101190840.24862.sgrubb@redhat.com> (raw)
In-Reply-To: <AANLkTimvHfXPKj64kLLLAXXUU8s5EnOv9=ckDc4j=p_=@mail.gmail.com>

On Wednesday, January 19, 2011 05:30:15 am Ashok Kumar J wrote:
>           I saw the function audit_send in the file netlink.c. But i did
> not get any man pages for this. I want to know the description of this
> structure.

If you look in lib/private.h
extern int audit_send(int fd, int type, const void *data, unsigned int size)
        hidden;

Its a hidden function that is not part of the public API and that is why there is no 
man page. What it sends to the kernel is:

struct audit_message {
        struct nlmsghdr nlh;
        char   data[MAX_AUDIT_MESSAGE_LENGTH];
};

The data format varies with each kind of command sent. The commands are found in 
/usr/include/linux/audit.h with a numeric value between 1000 and 1099. Some commands 
have lots of data, such as the ADD_RULE command. However, some have no data, such as 
the LIST_RULES command.

This is not documented in man pages because the logic is embodied in the library and 
it was never anticpated that the audit system be operated without at least libaudit.

-Steve

      reply	other threads:[~2011-01-19 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 10:30 audit_send function in netlink socket Ashok Kumar J
2011-01-19 13:40 ` 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=201101190840.24862.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.