|
| 1 | +.TH "AUDIT_GET_FEATURES" "3" "July 2025" "Red Hat" "Linux Audit API" |
| 2 | +.SH NAME |
| 3 | +audit_get_features, audit_set_feature \- query or change kernel audit features |
| 4 | +.SH SYNOPSIS |
| 5 | +.B #include <libaudit.h> |
| 6 | +.sp |
| 7 | +.BI "uint32_t audit_get_features(void);" |
| 8 | +.br |
| 9 | +.BI "int audit_set_feature(int " fd ", unsigned " feature ", unsigned " value ", unsigned " lock );" |
| 10 | +.SH DESCRIPTION |
| 11 | +.BR audit_get_features () |
| 12 | +returns a bitmap describing which kernel audit features are supported. The bitmap is cached internally and retrieved from the kernel on the first call. |
| 13 | +.PP |
| 14 | +.BR audit_set_feature () |
| 15 | +changes a feature bit for the kernel using the descriptor |
| 16 | +.I fd |
| 17 | +which must be an open audit netlink socket. |
| 18 | +.I feature |
| 19 | +selects the bit to modify. If |
| 20 | +.I value |
| 21 | +is nonzero the feature is enabled, otherwise it is disabled. If |
| 22 | +.I lock |
| 23 | +is nonzero the feature setting is locked until reboot. |
| 24 | +.PP |
| 25 | +The feature bits currently defined are: |
| 26 | +.TP |
| 27 | +.B AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT |
| 28 | +Kernel supports changing the backlog queue depth. |
| 29 | +.TP |
| 30 | +.B AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME |
| 31 | +Kernel supports delaying syscalls when the queue is full. |
| 32 | +.TP |
| 33 | +.B AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH |
| 34 | +Kernel will include the executable path on EXECVE records. |
| 35 | +.TP |
| 36 | +.B AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND |
| 37 | +Exclude rules may be used with more fields than just message type. |
| 38 | +.TP |
| 39 | +.B AUDIT_FEATURE_BITMAP_SESSIONID_FILTER |
| 40 | +Session identifier filtering is supported. |
| 41 | +.TP |
| 42 | +.B AUDIT_FEATURE_BITMAP_LOST_RESET |
| 43 | +Allows resetting the lost event counter. |
| 44 | +.TP |
| 45 | +.B AUDIT_FEATURE_BITMAP_FILTER_FS |
| 46 | +Kernel supports file system field filtering. |
| 47 | +.SH RETURN VALUE |
| 48 | +.BR audit_get_features |
| 49 | +returns the feature bitmap or 0 if feature queries are unsupported. |
| 50 | +.BR audit_set_feature |
| 51 | +returns \<= 0 on error, otherwise it is the netlink sequence id number. |
| 52 | +.SH SEE ALSO |
| 53 | +.BR audit_request_features (3), |
| 54 | +.BR audit_reset_lost (3), |
| 55 | +.BR audit_open (3). |
| 56 | +.SH AUTHOR |
| 57 | +Steve Grubb |
0 commit comments