Skip to content

Commit ac49ba3

Browse files
committed
Add auplugin information
1 parent c5ce7c3 commit ac49ba3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,27 @@ The auparse library is available to allow one to create custom reporting applica
257257

258258
You can write programs in one of two ways: iterate across events, records, and fields; or use the feed API to which a callback function is presented with a single, complete event that can be iterated across the records and fields. The former is best for working with files, while the latter is more appropriate for realtime data for a plugin.
259259

260+
AUPLUGIN
261+
--------
262+
The auplugin library helps developers write auditd plugins. It multithreads
263+
a plugin with a queue inbetween the threads. One thread pulls event records
264+
from auditd, then equeues them. The other thread sees the events and calls
265+
back a function of your choosing. This keeps auditd running at top speed
266+
since plugins keep their socket drained. The library offers functions to
267+
manage an event queue and dispatch audit records to a callback for
268+
processing. Its functionality falls into several categories:
269+
270+
- Initialization and shutdown helpers
271+
- Event loop processing or feeding events through libauparse
272+
- Queue statistics and management helpers
273+
- Buffered line readers for descriptor based input
274+
275+
Plugins generally follow one of two patterns. They can use
276+
`auplugin_event_loop()` with a record callback when raw records are
277+
sufficient. Alternatively `auplugin_event_feed()` queues the records
278+
for libauparse and presents fully formed events to the callback. The
279+
latter is typically used when plugin logic needs structured event data.
280+
260281
Audit Standards
261282
---------------
262283
You can find the standards to which the audit system conforms to in the ![Audit Documentation Project](https://github.com/linux-audit/audit-documentation).

0 commit comments

Comments
 (0)