xref: /freebsd/contrib/openbsm/libbsm/au_event.3 (revision b626f5a73a48f44a31a200291b141e1da408a2ff)
1ca0716f5SRobert Watson.\"-
2ca0716f5SRobert Watson.\" Copyright (c) 2005-2006 Robert N. M. Watson
3ca0716f5SRobert Watson.\" All rights reserved.
4ca0716f5SRobert Watson.\"
5ca0716f5SRobert Watson.\" Redistribution and use in source and binary forms, with or without
6ca0716f5SRobert Watson.\" modification, are permitted provided that the following conditions
7ca0716f5SRobert Watson.\" are met:
8ca0716f5SRobert Watson.\" 1. Redistributions of source code must retain the above copyright
9ca0716f5SRobert Watson.\"    notice, this list of conditions and the following disclaimer.
10ca0716f5SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
11ca0716f5SRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
12ca0716f5SRobert Watson.\"    documentation and/or other materials provided with the distribution.
13ca0716f5SRobert Watson.\"
14ca0716f5SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15ca0716f5SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16ca0716f5SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17ca0716f5SRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18ca0716f5SRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19ca0716f5SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20ca0716f5SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21ca0716f5SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22ca0716f5SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23ca0716f5SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24ca0716f5SRobert Watson.\" SUCH DAMAGE.
25ca0716f5SRobert Watson.\"
26ca0716f5SRobert Watson.Dd April 19, 2005
27ca0716f5SRobert Watson.Dt AU_EVENT 3
28ca0716f5SRobert Watson.Os
29ca0716f5SRobert Watson.Sh NAME
30ca0716f5SRobert Watson.Nm free_au_event_ent ,
31ca0716f5SRobert Watson.Nm setauevent ,
32ca0716f5SRobert Watson.Nm endauevent ,
33ca0716f5SRobert Watson.Nm getauevent ,
34ca0716f5SRobert Watson.Nm getauevent_r ,
35ca0716f5SRobert Watson.Nm getauevnam ,
36ca0716f5SRobert Watson.Nm getauevnam_r ,
37ca0716f5SRobert Watson.Nm getauevnum ,
38ca0716f5SRobert Watson.Nm getauevnum_r ,
39ca0716f5SRobert Watson.Nm getauevnonam ,
40bc168a6cSRobert Watson.Nm getauevnonam_r
41bc168a6cSRobert Watson.Nd "look up information from the audit_event database"
42ca0716f5SRobert Watson.Sh LIBRARY
43ca0716f5SRobert Watson.Lb libbsm
44ca0716f5SRobert Watson.Sh SYNOPSIS
45bc168a6cSRobert Watson.In bsm/libbsm.h
46ca0716f5SRobert Watson.Ft void
47bc168a6cSRobert Watson.Fn setauevent void
48ca0716f5SRobert Watson.Ft void
49bc168a6cSRobert Watson.Fn endauevent void
50ca0716f5SRobert Watson.Ft "struct au_event_ent *"
51bc168a6cSRobert Watson.Fn getauevent void
52ca0716f5SRobert Watson.Ft "struct au_event_ent *"
53ca0716f5SRobert Watson.Fn getauevent_r "struct au_event_ent *e"
54ca0716f5SRobert Watson.Ft "struct au_event_ent *"
55bc168a6cSRobert Watson.Fn getauevnam "const char *name"
56ca0716f5SRobert Watson.Ft "struct au_event_ent *"
57bc168a6cSRobert Watson.Fn getauevnam_r "struct au_event_ent *e" "const char *name"
58ca0716f5SRobert Watson.Ft "struct au_event_ent *"
59ca0716f5SRobert Watson.Fn getauevnum "au_event_t event_number"
60ca0716f5SRobert Watson.Ft "struct au_event_ent *"
61ca0716f5SRobert Watson.Fn getauevnum_r "struct au_event_ent *e" "au_event_t event_number"
62ca0716f5SRobert Watson.Ft "au_event_t *"
63bc168a6cSRobert Watson.Fn getauevnonam "const char *event_name"
64ca0716f5SRobert Watson.Ft "au_event_t *"
65bc168a6cSRobert Watson.Fn getauevnonam_r "au_event_t *ev" "const char *event_name"
66ca0716f5SRobert Watson.Sh DESCRIPTION
67ca0716f5SRobert WatsonThese interfaces may be used to look up information from the
68ca0716f5SRobert Watson.Xr audit_event 5
69ca0716f5SRobert Watsondatabase, which describes audit events.
70ca0716f5SRobert WatsonEntries in the database are described by
71bc168a6cSRobert Watson.Vt "struct au_event_ent"
72ca0716f5SRobert Watsonentries, which are returned by calls to
73ca0716f5SRobert Watson.Fn getauevent ,
74ca0716f5SRobert Watson.Fn getauevnam ,
75ca0716f5SRobert Watsonor
76ca0716f5SRobert Watson.Fn getauevnum .
77bc168a6cSRobert WatsonIt is also possible to look up an event number via a call to
78bc168a6cSRobert Watson.Fn getauevnonam .
79ca0716f5SRobert Watson.Pp
80bc168a6cSRobert WatsonThe
81ca0716f5SRobert Watson.Fn setauevent
82bc168a6cSRobert Watsonfunction
83ca0716f5SRobert Watsonresets the database access session for
84ca0716f5SRobert Watson.Xr audit_event 5 ,
85ca0716f5SRobert Watsonso that the next call to
86ca0716f5SRobert Watson.Fn getauevent
87ca0716f5SRobert Watsonwill start with the first entry in the database.
88ca0716f5SRobert Watson.Pp
89bc168a6cSRobert WatsonThe
90ca0716f5SRobert Watson.Fn endauevent
91bc168a6cSRobert Watsonfunction
92ca0716f5SRobert Watsoncloses the
93ca0716f5SRobert Watson.Xr audit_event 5
94ca0716f5SRobert Watsondatabase session.
95ca0716f5SRobert Watson.Pp
96bc168a6cSRobert WatsonThe
97ca0716f5SRobert Watson.Fn getauevent
98bc168a6cSRobert Watsonfunction
99ca0716f5SRobert Watsonreturns a reference to the next entry in the
100ca0716f5SRobert Watson.Xr audit_event 5
101ca0716f5SRobert Watsondatabase.
102ca0716f5SRobert Watson.Pp
103bc168a6cSRobert WatsonThe
104ca0716f5SRobert Watson.Fn getauevnam
105bc168a6cSRobert Watsonfunction
106ca0716f5SRobert Watsonreturns a reference to the entry in the
107ca0716f5SRobert Watson.Xr audit_event 5
108ca0716f5SRobert Watsondatabase with a name of
109bc168a6cSRobert Watson.Fa name .
110ca0716f5SRobert Watson.Pp
111ca0716f5SRobert Watson.Fn getauevnum
112ca0716f5SRobert Watsonreturns a reference to the entry in the
113ca0716f5SRobert Watson.Xr audit_event 5
114ca0716f5SRobert Watsondatabase with an event number of
115bc168a6cSRobert Watson.Fa event_number .
116ca0716f5SRobert Watson.Pp
117bc168a6cSRobert WatsonThe
118ca0716f5SRobert Watson.Fn getauevnonam
119bc168a6cSRobert Watsonfunction
120ca0716f5SRobert Watsonreturns a reference to an audit event number using the
121ca0716f5SRobert Watson.Xr audit_event 5
122ca0716f5SRobert Watsondatabase.
123ca0716f5SRobert Watson.Sh RETURN VALUES
124ca0716f5SRobert WatsonFunctions
125ca0716f5SRobert Watson.Fn getauevent ,
126ca0716f5SRobert Watson.Fn getauevent_r ,
127ca0716f5SRobert Watson.Fn getauevnam ,
128ca0716f5SRobert Watson.Fn getauevnam_r ,
129ca0716f5SRobert Watson.Fn getauevnum ,
130ca0716f5SRobert Watson.Fn getauevnum_r ,
131ca0716f5SRobert Watsonand
1320814440eSRobert Watson.Fn getauevnonam
133ca0716f5SRobert Watsonwill return a reference to a
134bc168a6cSRobert Watson.Vt "struct au_event_ent"
135ca0716f5SRobert Watsonor
136bc168a6cSRobert Watson.Vt au_event_t
137ca0716f5SRobert Watsonon success, or
138bc168a6cSRobert Watson.Dv NULL
139bc168a6cSRobert Watsonon failure, with
140ca0716f5SRobert Watson.Va errno
141ca0716f5SRobert Watsonset to provide further error information.
142ca0716f5SRobert Watson.Sh SEE ALSO
143ca0716f5SRobert Watson.Xr libbsm 3 ,
144ca0716f5SRobert Watson.Xr audit_event 5
145ca0716f5SRobert Watson.Sh HISTORY
146ca0716f5SRobert WatsonThe OpenBSM implementation was created by McAfee Research, the security
147ca0716f5SRobert Watsondivision of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
148ca0716f5SRobert WatsonIt was subsequently adopted by the TrustedBSD Project as the foundation for
149ca0716f5SRobert Watsonthe OpenBSM distribution.
150bc168a6cSRobert Watson.Sh AUTHORS
151bc168a6cSRobert Watson.An -nosplit
152bc168a6cSRobert WatsonThis software was created by
153bc168a6cSRobert Watson.An Robert Watson ,
154bc168a6cSRobert Watson.An Wayne Salamon ,
155bc168a6cSRobert Watsonand
156bc168a6cSRobert Watson.An Suresh Krishnaswamy
157bc168a6cSRobert Watsonfor McAfee Research, the security research division of McAfee,
158bc168a6cSRobert WatsonInc., under contract to Apple Computer, Inc.
159bc168a6cSRobert Watson.Pp
160bc168a6cSRobert WatsonThe Basic Security Module (BSM) interface to audit records and audit event
161bc168a6cSRobert Watsonstream format were defined by Sun Microsystems.
162ca0716f5SRobert Watson.Sh BUGS
163bc168a6cSRobert WatsonThe
164ca0716f5SRobert Watson.Va errno
165bc168a6cSRobert Watsonvariable
166ca0716f5SRobert Watsonis not always properly set following a failure.
167ca0716f5SRobert Watson.Pp
168ca0716f5SRobert WatsonThese routines are thread-safe, but not re-entrant, so simultaneous or
169ca0716f5SRobert Watsoninterleaved use of these functions will affect the iterator.
170