NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SUMMARY OF TRUSTED SOLARIS CHANGES | FILES | ATTRIBUTES | SEE ALSO | NOTES
#include <bsm/libbsm.h>int au_preselect(au_event_t event, au_mask_t *mask_p, int sorf, int flag);
au_preselect() determines whether or not the audit event event is preselected against the binary preselection mask pointed to by mask_p (usually obtained by a call to getaudit(2)). au_preselect() looks up the classes associated with event in audit_event(4) and compares them with the classes in mask_p. If the classes associated with event match the classes in the specified portions of the binary preselection mask pointed to by mask_p, the event is said to be preselected.
sorf indicates whether the comparison is made with the success portion, the failure portion or both portions of the mask pointed to by mask_p.
The following are the valid values of sorf:
Compare the event class with the success portion of the preselection mask.
Compare the event class with the failure portion of the preselection mask.
Compare the event class with both the success and failure portions of the preselection mask.
flag tells au_preselect() how to read the audit_event(4) database. Upon initial invocation, au_preselect() reads the audit_event(4) database and allocates space in an internal cache for each entry with malloc(3C). In subsequent invocations, the value of flag determines where au_preselect() obtains audit event information. The following are the valid values of flag:
Get audit event information by searching the audit_event(4) database.
Get audit event information from internal cache created upon the initial invocation. This option is much faster.
au_preselect() returns:
event is not preselected.
event is preselected.
An error occurred. au_preselect() couldn't allocate memory or couldn't find event in the audit_event(4) database.
This function looks up the classes associated with event in audit_event(4) rather than in audit_event(4). By default, auditing is enabled in the Trusted Solaris environment.
Maps audit class number to audit class names and descriptions.
Maps audit event number to audit event names.
See attributes(5) for a description of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | MT-Safe |
This functionality is active only if the auditing has been enabled. By default, auditing is enabled in the Trusted Solaris environment. See Trusted Solaris Audit Administration for how to disable and enable auditing. au_preselect() is normally called prior to constructing and writing an audit record. If the event is not preselected, the overhead of constructing and writing the record can be saved.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SUMMARY OF TRUSTED SOLARIS CHANGES | FILES | ATTRIBUTES | SEE ALSO | NOTES