[ Previous |
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1
Enables and disables system auditing.
Standard C Library (libc.a)
int audit (Command, Argument)
The audit subroutine enables or disables system auditing.
When auditing is enabled, audit records are created for security-relevant events. These records can be collected through the auditbin subroutine, or through the /dev/audit special file interface.
|| Defined in the sys/audit.h file, can be one of the following values:
- Returns a mask indicating the state of the auditing subsystem. The mask is a logical ORing of the AUDIT_ON, AUDIT_OFF, and AUDIT_PANIC flags. The Argument parameter is ignored.
- Enables auditing. If auditing is already enabled, only the failure-mode behavior changes. The Argument parameter specifies recovery behavior in the event of failure and may be either 0 or the value AUDIT_PANIC.
Note: If AUDIT_PANIC is specified, bin-mode auditing must be enabled before the audit subroutine call.
- Disables the auditing system if auditing is enabled. If the auditing system is disabled, the audit subroutine does nothing. The Argument parameter is ignored.
- Disables the auditing system (as does AUDIT_OFF) and resets the auditing system. If auditing is already disabled, only the system configuration is reset. Resetting the audit configuration involves clearing the audit events and audited objects table, and terminating bin and stream auditing. The Argument parameter is ignored.
- Audit event records will be buffered until a total of Argument
records have been saved, at which time the audit event records will be flushed to disk. An Argument value of zero disables this functionality. This parameter only applies to AIX Version 4.1.4 and later.
- Audit event data will be buffered until a total of Argument
bytes of data have been saved, at which time the audit event data will be flushed to disk. An Argument value of zero disables this functionality. This parameter only applies to AIX Version 4.1.4 and later.
|| Specifies the behavior when a bin write fails
AUDIT_ON) or specifies the size of the audit event buffer (for
AUDIT_BYTE_THRESHOLD). For all other commands, the value of
is ignored. The valid values are:
- The operating system shuts down if an audit record cannot be written to a bin.
is specified, bin-mode auditing must be enabled before the
- The number of bytes or audit event records which will be buffered. This parameter is valid only with the command AUDIT_BYTE_THRESHOLD and AUDIT_EVENT_THRESHOLD. A value of zero will disable either byte (for AUDIT_BYTE_THRESHOLD) or event (for AUDIT_EVENT_THRESHOLD) buffering.
For a Command value of AUDIT_QUERY, the audit subroutine returns, upon successful completion, a mask indicating the state of the auditing subsystem. The mask is a logical ORing of the AUDIT_ON, AUDIT_OFF, AUDIT_PANIC, and AUDIT_NO_PANIC flags. For any other Command value, the audit subroutine returns 0 on successful completion.
If the audit subroutine fails, a value of -1 is returned and the errno global variable is set to indicate the error.
The audit subroutine fails if either of the following is true:
|| The Command parameter is not one of AUDIT_ON, AUDIT_OFF, AUDIT_RESET, or AUDIT_QUERY.|
|| The Command parameter is AUDIT_ON and the Argument parameter specifies values other than AUDIT_PANIC.|
|| The calling process does not have root user authority.|
This subroutine is part of Base Operating System (BOS) Runtime.
|| Specifies the audit pseudo-device from which the audit records are read.|
The auditbin subroutine, auditevents subroutine, auditlog subroutine, auditobj subroutine, auditproc subroutine.
The audit command.
List of Security and Auditing Subroutines and Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
[ Previous |