[PATCH 1/7] audit: implement generic feature setting and retrieving

Eric Paris eparis at redhat.com
Fri May 24 16:28:40 UTC 2013


On Fri, 2013-05-24 at 12:11 -0400, Eric Paris wrote:
> The audit_status structure was not designed with extensibility in mind.
> Define a new AUDIT_SET_FEATURE message type which takes a new structure
> of bits where things can be enabled/disabled/locked one at a time.  This
> structure should be able to grow in the future while maintaining forward
> and backward compatibility (based loosly on the ideas from capabilities
> and prctl)
> 
> This does not actually add any features, but is just infrastructure to
> allow new on/off types of audit system features.
> 
> Signed-off-by: Eric Paris <eparis at redhat.com>

Attached you will find the test program I used to check that things were
working correctly.  It should give an idea to Steve how we can program
the features support in userspace.  I believe it fits very nicely to
have a new syntax in audit.rules to set (and lock if needed/wanted)
these features.

netlink.c is just some helper code I stole from the audit tree to get
some functions which weren't exposed externally.  The only part really
interesting is test.c.

You will also need the include/uapi/linux/audit.h file from this patch
to build test.c

-Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 71 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20130524/ab78a427/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netlink.c
Type: text/x-csrc
Size: 2752 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20130524/ab78a427/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: private.h
Type: text/x-chdr
Size: 146 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20130524/ab78a427/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 1984 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-audit/attachments/20130524/ab78a427/attachment-0003.bin>


More information about the Linux-audit mailing list