2 .\" Copyright (c) 2005-2007 Robert N. M. Watson
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/libbsm.3#13 $
33 .Nd "Basic Security Module (BSM) Audit API"
41 library routines provide an interface to BSM audit record streams, allowing
42 both the parsing of existing audit streams, as well as the creation of new
43 audit records and streams.
48 provides a large number of Audit programming interfaces in several classes:
49 event stream interfaces, class interfaces, control interfaces, event
50 interfaces, I/O interfaces, mask interfaces, notification interfaces, token
51 interfaces, and user interfaces.
52 These are described respectively in the
63 .Ss Audit Event Stream Interfaces
64 Audit event stream interfaces support interaction with file-backed audit
67 .Xr au_close_buffer 3 ,
72 .Ss Audit Class Interfaces
73 Audit class interfaces support the look up of information from the
78 .Xr getauclassent_r 3 ,
80 .Xr getauclassnam_r 3 ,
82 .Ss Audit Control Interfaces
83 Audit control interfaces support the look up of information from the
96 .Ss Audit Event Interfaces
97 Audit event interfaces support the look up of information from the
107 .Xr getauevnonam_r 3 ,
110 .Ss Audit I/O Interfaces
111 Audit I/O interfaces support the processing and printing of tokens, as well
112 as the reading of audit records:
116 .Ss Audit Mask Interfaces
117 Audit mask interfaces convert support the conversion between strings and
120 They may also be used to determine if a particular audit event is matched
123 .Xr getauditflagsbin 3 ,
124 .Xr getauditflagschar 3 .
125 .Ss Audit Notification Interfaces
126 Audit notification routines track audit state in a form permitting efficient
127 update, avoiding frequent system calls to check the kernel audit state:
129 .Xr au_notify_initialize 3 ,
130 .Xr au_notify_terminate 3 .
131 These interfaces are implemented only for Darwin/Mac OS X.
132 .Ss Audit Token Interface
133 Audit token interfaces permit the creation of tokens for use in creating
134 audit records for submission to event streams.
135 Each interface converts a C type to its
143 .Xr au_to_exec_args 3 ,
144 .Xr au_to_exec_env 3 ,
148 .Xr au_to_header32 3 ,
149 .Xr au_to_header64 3 ,
150 .Xr au_to_in_addr 3 ,
151 .Xr au_to_in_addr_ex 3 ,
154 .Xr au_to_ipc_perm 3 ,
157 .Xr au_to_newgroups 3 ,
160 .Xr au_to_process 3 ,
161 .Xr au_to_process32 3 ,
162 .Xr au_to_process64 3 ,
163 .Xr au_to_process_ex 3 ,
164 .Xr au_to_process32_ex 3 ,
165 .Xr au_to_process64_ex 3 ,
167 .Xr au_to_return32 3 ,
168 .Xr au_to_return64 3 ,
170 .Xr au_to_sock_inet 3 ,
171 .Xr au_to_sock_inet32 3 ,
172 .Xr au_to_sock_inet128 3 ,
173 .Xr au_to_subject 3 ,
174 .Xr au_to_subject32 3 ,
175 .Xr au_to_subject64 3 ,
176 .Xr au_to_subject_ex 3 ,
177 .Xr au_to_subject32_ex 3 ,
178 .Xr au_to_subject64_ex 3 ,
180 .Xr au_to_trailer 3 ,
181 .Xr au_to_zonename 3 .
182 .Ss Audit User Interfaces
183 Audit user interfaces support the look up of information from the
190 .Xr getauuserent_r 3 ,
192 .Xr getauusernam_r 3 ,
193 .Xr getfauditflags 3 .
205 The OpenBSM implementation was created by McAfee Research, the security
206 division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
207 It was subsequently adopted by the TrustedBSD Project as the foundation for
208 the OpenBSM distribution.
211 This software was created by
215 .An Suresh Krishnaswamy
216 for McAfee Research, the security research division of McAfee,
217 Inc., under contract to Apple Computer, Inc.
219 The Basic Security Module (BSM) interface to audit records and audit event
220 stream format were defined by Sun Microsystems.
222 Bugs would not be unlikely.
226 library implementations are generally thread-safe, but not reentrant.
228 The assignment of routines to classes could use some work, as it is
232 should probably be considered a stream routine.