public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Subject: Re: audit_ftype_to_name?
Date: Tue, 22 Oct 2013 13:59:32 -0400	[thread overview]
Message-ID: <22306526.QMWnzUdp8j@x2> (raw)
In-Reply-To: <20131018114722.GA14660@columba.inf.ed.ac.uk>

On Friday, October 18, 2013 12:47:23 PM Stephen Quinney wrote:
> I am wanting to use the audit_ftype_to_name function which is provided
> in the audit python module. It seems that this always returns None
> which is not particularly useful.

It shouldn't return that except when there is no match.

> I can see that the function is implemented in lib/lookup_table.c and it only
> does something when the NO_TABLES cpp macro is not defined. 

Correct.

>In src/mt/Makefile.am that is defined (with -DNO_TABLES in AM_CFLAGS), I assume
> that is deliberate?

Yes. That location is a private copy recompiled for pthreads use and linked 
only to auditd. Auditd has no use for those tables so they are thrown away.

> I can't see any definition of the ftype_i2s function which is called
> by audit_ftype_to_name so maybe this hasn't been implemented yet?

Yes, it has been. However, its over in lib/libaudit.

It seems to work fin on my system:

#!/usr/bin/env python
import sys
import audit

name = audit.audit_ftype_to_name(0140000)
print '%s\n' % (name,),
sys.exit(0)


$ ./test.py 
socket

  reply	other threads:[~2013-10-22 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 11:47 audit_ftype_to_name? Stephen Quinney
2013-10-22 17:59 ` Steve Grubb [this message]
2013-10-22 18:59   ` 12/31/1969 David Flatley
2013-10-22 20:48     ` 12/31/1969 Alexander Viro
2013-10-22 20:58   ` audit_ftype_to_name? Stephen Quinney
2013-10-22 21:26     ` audit_ftype_to_name? 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=22306526.QMWnzUdp8j@x2 \
    --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