| 1 |
.TH "AUDIT_CAN_CONTROL" "3" "July 2025" "Red Hat" "Linux Audit API" |
| 2 |
.SH NAME |
| 3 |
audit_can_control, audit_can_write, audit_can_read \- test audit related capabilities |
| 4 |
.SH SYNOPSIS |
| 5 |
.B #include <libaudit.h> |
| 6 |
.sp |
| 7 |
.BI "int audit_can_control(void);" |
| 8 |
.br |
| 9 |
.BI "int audit_can_write(void);" |
| 10 |
.br |
| 11 |
.BI "int audit_can_read(void);" |
| 12 |
.SH DESCRIPTION |
| 13 |
.BR audit_can_control () |
| 14 |
returns 1 if the calling process possesses the |
| 15 |
.BR CAP_AUDIT_CONTROL |
| 16 |
capability, otherwise 0. |
| 17 |
.BR audit_can_write () |
| 18 |
returns 1 if |
| 19 |
.BR CAP_AUDIT_WRITE |
| 20 |
is available. |
| 21 |
.BR audit_can_read () |
| 22 |
returns 1 if |
| 23 |
.BR CAP_AUDIT_READ |
| 24 |
is present. When libcap-ng support is not available these functions return 1 only when the effective UID is 0. |
| 25 |
.SH RETURN VALUE |
| 26 |
These functions return 1 when the capability is present and 0 otherwise. |
| 27 |
.SH SEE ALSO |
| 28 |
.BR audit_open (3). |
| 29 |
.SH AUTHOR |
| 30 |
Steve Grubb |