Security and Auditing Library Functions auopen(3BSM)
NAME
auopen, auclose, auwrite - construct and write audit
records
SYNOPSIS
cc [ flag... ] file... -lbsm -lsocket -lnsl [ library... ]
#include
int auclose(int d, int keep, short event);
int auopen(void);
int auwrite(int d, tokent *m);
DESCRIPTION
The auopen() function returns an audit record descriptor to
which audit tokens can be written using auwrite(). The
audit record descriptor is an integer value that identifies
a storage area where audit records are accumulated.
The auclose() function terminates the life of an audit
record d of type event started by auopen(). If the keep
parameter is AUTONOWRITE, the data contained therein is
discarded. If the keep parameter is AUTOWRITE, the addi-
tional parameters are used to create a header token.
Depending on the audit policy information obtained by audi-
ton(2), additional tokens such as sequence and trailer
tokens can be added to the record. The auclose() function
then writes the record to the audit trail by calling
audit(2). Any memory used is freed by calling free(3C).
The auwrite() function adds the audit token pointed to by m
to the audit record identified by the descriptor d. After
this call is made the audit token is no longer available to
the caller.
RETURN VALUES
Upon successful completion, auopen() returns an audit
record descriptor. If a descriptor could not be allocated,
auopen() returns -1 and sets errno to indicate the error.
Upon successful completion, auclose() returns 0. If d is
an invalid or corrupted descriptor or if audit() fails,
auclose() returns -1 without setting errno. If audit()
fails, errno is set to one of the error values described on
the audit(2) manual page.
SunOS 5.11 Last change: 31 Mar 2005 1
Security and Auditing Library Functions auopen(3BSM)
Upon successful completion, auwrite() returns 0. If d is
an invalid descriptor or m is an invalid token, or if
audit() fails, auwrite() returns -1 without setting errno.
If audit() fails, errno is set to one of the error values
described on the audit(2) manual page.
ERORS
The auopen() function will fail if:
ENOMEM The physical limits of the system have been
exceeded such that sufficient memory cannot be
allocated.
EAGAIN There is currently insufficient memory available.
The application can try again later.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Stable
MT-Level MT-Safe
SEE ALSO
bsmconv(1M), audit(2), auditon(2), aupreselect(3BSM),
auto(3BSM), free(3C), attributes(5)
NOTES
The functionality described on this manual page is available
only if the Solaris Auditing has been enabled. See
bsmconv(1M) for more information.
SunOS 5.11 Last change: 31 Mar 2005 2
|