2 .\" Copyright (c) 2004-2009 Apple Inc.
3 .\" Copyright (c) 2015 Christian Brueffer
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the author nor the names of
15 .\" its contributors may be used to endorse or promote products derived
16 .\" from this software without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 .Nm au_notify_initialize ,
36 .Nm au_notify_terminate
37 .Nd "audit event notification"
43 .Fn au_get_state "void"
45 .Fn au_notify_initialize "void"
47 .Fn au_notify_terminate "void"
51 audit notification API tracks audit state in a form permitting efficient
52 update, avoiding frequent system calls to check the kernel audit state.
53 It is implemented only for Darwin/Mac OS X.
57 function provides a lightweight way to check whether or not auditing is
59 If a client wants to use this function to determine whether an entire
60 series of audit calls should be made -- as in the common case of a caller
61 building a set of tokens, then writing them -- it should cache the audit
62 status in a local variable.
63 This function always returns the current state of auditing.
64 If audit notification has not already been initialized by calling
65 .Fn au_notify_initialize
66 it will be automatically initialized on the first call of
70 .Fn au_notify_initialize
71 function initializes audit notification.
74 .Fn au_notify_terminate
75 function cancels audit notification and frees the resources associated with it.
76 Responsible code that no longer needs to use
78 should call this function.
80 If no error occurred the
84 if auditing is disabled or suspended, and
86 if auditing is enabled and active.
87 Otherwise, the function can return any of the errno values defined for
91 if audit does not appear to be supported by the system.
94 .Fn au_notify_initialize
95 function returns 0 on success,
97 if audit does not appear to be supported by the system,
98 or one of the status codes defined in
100 on Mac OS X to indicate the error.
103 .Fn au_notify_terminate
104 function returns 0 on success, or \-1 on failure.
107 .Xr notify 3 (Mac OS X)
109 The OpenBSM implementation was created by McAfee Research, the security
110 division of McAfee Inc., under contract to Apple Computer, Inc., in 2004.
111 It was subsequently adopted by the TrustedBSD Project as the foundation for
112 the OpenBSM distribution.
114 This software was created by
115 .An Apple Computer, Inc .
117 The Basic Security Module (BSM) interface to audit records and audit event
118 stream format were defined by Sun Microsystems.