Appends an audit record to the audit trail file.
Standard C Library (libc.a)
int auditlog (Event, Result, Buffer, BufferSize) char *Event; int Result; char *Buffer; int BufferSize;
The auditlog subroutine generates an audit record. The kernel audit-logging component appends a record for the specified Event if system auditing is enabled, process auditing is not suspended, and the Event parameter is in one or more of the audit classes for the current process.
The audit logger generates the audit record by adding the Event and Result parameters to the audit header and including the resulting information in the Buffer parameter as the audit tail.
|The name of the audit event to be generated. This parameter should be the name of an audit event. Audit event names are truncated to 15 characters plus null.
| Describes the result of this event. Valid values are defined in the sys/audit.h file and include the following:
|Points to a buffer containing the tail of the audit record. The format of the information in this buffer depends on the event name.
|Specifies the size of the Buffer parameter, including the terminating null.
Upon successful completion, the auditlog subroutine returns a value of 0. If auditlog fails, a value of -1 is returned and the errno global variable is set to indicate the error.
The auditlog subroutine does not return any indication of failure to write the record where this is due to inappropriate tailoring of auditing subsystem configuration files or user-written code. Accidental omissions and typographical errors in the configuration are potential causes of such a failure.
The auditlog subroutine fails if any of the following are true:
|The Event or Buffer parameter points outside of the process' address space.
|The auditing system is either interrupted or not initialized.
|The length of the audit record is greater than 32 kilobytes.
|The process does not have root user authority.
|Memory allocation failed.
This subroutine is part of Base Operating System (BOS) Runtime.
The audit subroutine, auditbin subroutine, auditevents subroutine, auditobj subroutine, auditproc subroutine, auditwrite subroutine.
List of Security and Auditing Subroutines and Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.