getauevent(3)
NAME
getauevent, getauevnam, getauevnum, getauevnonam, setauevent, endauevent, − get audit_user entry
SYNOPSIS
cc [ flag ... ] file ... −lbsm −lsocket −lnsl −lintl [ library ... ]
#include <sys/param.h>
#include <bsm/libbsm.h>
struct au_event_ent ∗getauevent( void);
struct au_event_ent ∗getauevnam( char ∗name);
struct au_event_ent ∗getauevnum( au_event_t event_number);
au_event_t ∗getauevnonam( char ∗event_name);
void setauevent( void);
void endauevent( void);
AVAILABILITY
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information.
DESCRIPTION
getauevent(), getauevnam() and getauevnum() each returns a pointer to an audit_event structure.
getauevent() enumerates audit_event entries: successive calls to getauevent() will return either successive audit_event entries or NULL.
getauevnam() searches for an audit_event entry with a given event name name.
getauevnum() searches for an audit_event entry with a given event number number.
getauevnonum() searches for an audit_event entry with a given event name name and returns the corresponding event number.
setauevent() “rewinds” to the beginning of the enumeration of audit_event entries. Calls to getauevnam(), getauevnum() or getauevnonum() may leave the enumeration in an indeterminate state, so setauevent() should be called before the first getauevent().
endauevent() may be called to indicate that audit_event processing is complete; the system may then close any open audit_event file, deallocate storage, and so forth.
The internal representation of an audit_event entry is an struct au_event_ent structure defined in <bsm/libbsm.h> with the following members:
au_event_t ae_number;
char∗ae_name;
char∗ae_desc;
au_class_tae_class;
RETURN VALUES
getauevent(), getauevnam() and getauevnum() return a pointer to a struct au_event_ent if it successfully locates the requested entry; otherwise it returns NULL.
getauevnonam() returns an event number of type au_event_t if it successfully enumerates an entry; otherwise it returns NULL, indicating it could not find the requested event name.
FILES
/etc/security/audit_event
/etc/passwd
SEE ALSO
bsmconv(1M), getpwnam(3C), getauclassent(3), audit_class(4), audit_event(4), passwd(4)
NOTES
All information is contained in a static area, so it must be copied if it is to be saved.
Sun Microsystems — Last change: 6 May 1993