audit2
Commit bsm audit record to audit log
Usage
#include <bsm/audit.h>
int
audit(const char *record, u_int length);
Overview
The audit() system call submits a completed BSM audit record to the system audit log.
The record argument is a pointer to the specific event to be recorded and length is the size in bytes of the data to be written.
Return values
The audit() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
Errors
The audit() system call will fail and the data never written if:
- [EFAULT]
-
The record argument is beyond the allocated address space of the process.
- [EINVAL]
-
The token ID is invalid or length is larger than MAXAUDITDATA.
- [EPERM]
-
The process does not have sufficient permission to complete the operation.
Releases
47 releases since FreeBSD 6.2-RELEASE; the text changed 3 times.