2 .\" Copyright (c) 2007 Apple Inc. All rights reserved.
4 .\" @APPLE_LICENSE_HEADER_START@
6 .\" This file contains Original Code and/or Modifications of Original Code
7 .\" as defined in and that are subject to the Apple Public Source License
8 .\" Version 2.0 (the 'License'). You may not use this file except in
9 .\" compliance with the License. Please obtain a copy of the License at
10 .\" http://www.opensource.apple.com/apsl/ and read it before using this
13 .\" The Original Code and all software distributed under the License are
14 .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 .\" Please see the License for the specific language governing rights and
19 .\" limitations under the License.
21 .\" @APPLE_LICENSE_HEADER_END@
28 .Nd configure the current audit parameters on the system
30 .Fd #include <bsm/audit.h>
32 .Fn auditon "int cmd" "void * data" "int length"
36 function manipulates various audit parameters. The
38 argument points to the appropriate structure from the header file.
42 parameter in bytes. It will typically be the sizeof the the structure.
46 Get the current audit policy.
48 should point to a long. The policy is the bitwise OR'ing of the
49 appropriate flags from
51 If AUDIT_AHLT is set, the system will kernel panic if it cannot write to the
52 global audit trail. If AUDIT_CNT is not set and the system becomes low on
53 space, audited events will block until the low space condition is remedied.
54 Unaudited events are unaffected. The other policy flags are not implemented.
56 Set the current audit policy.
58 should point to a long specifying the desired audit policy, as described in
61 Get the current value of the audit preselection mask for non-attributable events.
67 specifies which classes of successful audit events are to be logged to the
68 audit trail. The field
70 specifies which classes of failed audit events are to be logged. The value of
71 both fields is the bitwise OR'ing of the event classes specified in
73 The various audit classes are described more fully in
76 Set the current value of the audit preselection mask for non-attributable events.
80 The masks are defined as described in A_GETKMASK.
82 Get the current settings for the audit queue (specifying in kernel buffer size,
83 percentage of free filesystem blocks, and limits to the number of audit records
89 Set the current settings for the audit queue.
93 .\" The following are not yet implemented, but as mentioned in the header file.
101 Gets the current condition of the auditing subsystem. If the value is
102 AUC_AUDITING, then the audit implementation is currently running. If the
103 value is AUC_NOAUDIT then the audit implementation is currently turned off.
105 should point to a long.
107 Sets the condition of the auditing subsystem. If AUC_NOAUDIT is set, then
108 auditing is temporarily suspended. If AUC_AUDITING is set, auditing is resumed.
109 If AUC_DISABLED is set, the auditing system will shutdown, draining all audit
110 records and closing out the audit trail file.
111 To re-enable auditing, a call to
113 is required in addition to setting the condition to AUC_AUDITING.
115 should point to a long.
117 Returns the audit class for the specified audit event.
120 .Fa au_evclassmap_t .
122 Sets the audit class for the specified audit event.
125 .Fa au_evclassmap_t .
127 Returns the audit information stored in the credential for the current process.
132 Sets the audit settings for a process. The audit user ID, preselection masks
133 for both success and failure, and terminal IDs must be set.
139 Set the limit on audit trail file size. File size is in bytes. The file size
140 specified is treated as an advisory limit. The system will make a best effort
141 attempt to rotate log files before they exceed the requested maximum size, but
142 makes no guarantees on log file size
148 field is used to specify the new file size, which must be greater than
149 MIN_AUDIT_FILE_SIZE. A value of 0 indicates no limit on the audit trail's size. The
151 field is ignored. A errno value of EINVAL indicates a maximum file size that is
154 Return the maximum allowable size of the audit trail, and the current size of
161 Not implemented, returns ENOSYS.
163 Not implemented, returns ENOSYS.
165 Not implemented, returns ENOSYS.
168 Upon successful completion a value of 0 is returned.
169 Otherwise, a value of -1 is returned and
171 is set to indicate the error.
174 Errors are specific to the operation requested. In addition, rhe
176 system call will fail if:
180 is less than or equal to zero, or if it is greater than any of the expected structures.
189 .Xr getaudit_addr 2 ,
190 .Xr setaudit_addr 2 ,
195 function call first appeared in Mac OS X 10.3 (Panther).