2 .\" Copyright (c) 2008-2011 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 .Nm setaudit(NOW DEPRECATED)
29 .Nd "set audit session state"
32 .In bsm/audit_session.h
34 .Fn setaudit_addr "auditinfo_addr_t *auditinfo_addr" "u_int length"
35 .Sh SYNOPSIS (NOW DEPRECATED)
38 .Fn setaudit "auditinfo_t *auditinfo"
45 data structure for the
47 argument which supports Terminal IDs with large addresses
48 such as those used in IP version 6. It is defined as follows:
51 struct auditinfo_addr {
52 au_id_t ai_auid; /* Audit user ID. */
53 au_mask_t ai_mask; /* Audit masks. */
54 au_tid_addr_t ai_termid; /* Terminal ID. */
55 au_asid_t ai_asid; /* Audit session ID. */
56 u_int64_t ai_flags; /* Audit session flags */
58 typedef struct auditinfo_addr auditinfo_addr_t;
64 variable contains the audit identifier which is recorded in the audit log for
65 each event the process caused. The value of AU_DEFAUDITID (-1) should not be
66 used. The exception is if the value of audit identifier is known at the start
67 of the session but will be determined and set later. Until
69 is set to something other than AU_DEFAUDITID any audit events
70 generated by the system with be filtered by the non-attributed audit
75 data structure defines the bit mask for auditing successful and failed events
76 out of the predefined list of event classes. It is defined as follows:
80 unsigned int am_success; /* success bits */
81 unsigned int am_failure; /* failure bits */
83 typedef struct au_mask au_mask_t;
89 data structure includes a larger address storage field and an additional
90 field with the type of address stored:
98 typedef struct au_tid_addr au_tid_addr_t;
104 variable contains the audit session ID which is recorded with every event
105 caused by the process. It can be any value in the range 1 to PID_MAX (99999).
106 If the value of AU_ASSIGN_ASID is used for
108 a unique session ID will be generated by the kernel.
109 The audit session ID will be returned in the
115 field is opaque to the kernel and can be used to store flags associated
116 with the audit session. Please see the
117 .Ao Pa bsm/audit_session.h Ac
119 for more infomration and flag definitions for this platform.
123 system call require an appropriate privilege to complete.
125 This system call should only be called once at the start of a new
126 session and not again during the same session to update the session
128 There are some exceptions, however.
131 field may be updated later if initially set to the value of
135 fields may be updated later if the
139 is set to AU_IPv4 and the other
141 fields are all set to zero.
142 Creating a new session is done by setting the
144 field to an unique session value or AU_ASSIGN_ASID.
145 These system calls will fail when attempting to change the
149 fields once set to something other than the default values.
152 field may be updated only according to local access control
153 policy but this is usually accomplished with
155 using the A_SETSFLAGS command.
156 The audit preselection masks may be changed at any time
157 but are usually updated with
162 system call (NOW DEPRECATED)
163 sets the active audit session state for the current process via the
170 sets extended state via
177 data structure (NOW DEPRECATED) is defined as follows:
181 au_id_t ai_auid; /* Audit user ID */
182 au_mask_t ai_mask; /* Audit masks */
183 au_tid_t ai_termid; /* Terminal ID */
184 au_asid_t ai_asid; /* Audit session ID */
186 typedef struct auditinfo auditinfo_t;
192 data structure (NOW DEPRECATED) defines the Terminal ID recorded with every
193 event caused by the process. It is defined as follows:
200 typedef struct au_tid au_tid_t;
204 .Rv -std setaudit_addr
208 A failure occurred while data transferred to or from
211 Illegal argument was passed by a system call.
213 The process does not have sufficient permission to complete
224 The OpenBSM implementation was created by McAfee Research, the security
225 division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004.
226 It was subsequently adopted by the TrustedBSD Project as the foundation for
227 the OpenBSM distribution.
232 in Mac OS X 10.7 to support longer terminal addresses such as those used
235 is now deprecated and
237 should be used instead.
240 This software was created by McAfee Research, the security research division
241 of McAfee, Inc., under contract to Apple Computer Inc.
242 Additional authors include
247 The Basic Security Module (BSM) interface to audit records and audit event
248 stream format were defined by Sun Microsystems.
250 This manual page was written by
251 .An Robert Watson Aq rwatson@FreeBSD.org
253 .An Stacey Son Aq sson@FreeBSD.org .