All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lisa Smith <lisa.m.smith@hp.com>
To: LSPP <redhat-lspp@redhat.com>,
	Audit Mailing List <linux-audit@redhat.com>
Subject: Using the Audit Failure Action Query functionality
Date: Mon, 17 Jul 2006 14:03:52 -0400	[thread overview]
Message-ID: <44BBD108.4060506@hp.com> (raw)

Starting with audit 1.2.4, the new audit failure action functionality is
available for applications and services. 

The 1.2.5 audit package contains a man page for the new API,
get_auditfail_action(), which includes the following example that can be
used as a starting point for application developers:

              /* Sample code */
              auditfail_t failmode;

              if ((fd = audit_open() ) < 0 ) {
                   fprintf (stderr, "Cannot open netlink audit socket");

                   /* Get the failure_action */
                   if ((rc = get_auditfail_action(&failmode)) == 0) {
                       if (failmode == FAIL_LOG)
                            fprintf (stderr, "Audit subsystem unavailable");
                       else if (failmode == FAIL_TERMINATE)
                            exit (1);
                       /* If failmode == FAIL_IGNORE, do nothing */
                   }
              }

I'm happy to provide help to anyone who would like to incorporate the
new functionality into an application they are maintaining.  If there
are any applications people would like me to go ahead and modify, please
let me know.

Lisa

                 reply	other threads:[~2006-07-17 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=44BBD108.4060506@hp.com \
    --to=lisa.m.smith@hp.com \
    --cc=linux-audit@redhat.com \
    --cc=redhat-lspp@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.