1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH AUDITRECORD 1M "Mar 6, 2017"
.SH NAME
auditrecord \- display audit record formats
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/auditrecord\fR [\fB-d\fR] [ [\fB-a\fR] | [\fB-e\fR \fIstring\fR] | [\fB-c\fR \fIclass\fR] |
[\fB-i\fR \fIid\fR] | [\fB-p\fR \fIprogramname\fR] | [\fB-s\fR \fIsystemcall\fR] | [\fB-h\fR]]
.fi
.SH DESCRIPTION
.LP
The \fBauditrecord\fR utility displays the event ID, audit class and selection
mask, and record format for audit record event types defined in
\fBaudit_event\fR(4). You can use \fBauditrecord\fR to generate a list of all
audit record formats, or to select audit record formats based on event class,
event name, generating program name, system call name, or event ID.
.sp
.LP
There are two output formats. The default format is intended for display in a
terminal window; the optional HTML format is intended for viewing with a web
browser.
.sp
.LP
Tokens contained in square brackets ( \fB[ ]\fR ) are optional and might not be
present in every record.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.sp .6
.RS 4n
List all audit records.
.RE
.sp
.ne 2
.na
\fB\fB-c\fR \fIclass\fR\fR
.ad
.sp .6
.RS 4n
List all audit records selected by \fIclass\fR. \fIclass\fR is one of the
two-character class codes from the file \fB/etc/security/audit_class\fR.
.RE
.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
Debug mode. Display number of audit records that are defined in
\fBaudit_event\fR, the number of classes defined in \fBaudit_class\fR, any
mismatches between the two files, and report which defined events do not have
format information available to \fBauditrecord\fR.
.RE
.sp
.ne 2
.na
\fB\fB-e\fR \fIstring\fR\fR
.ad
.sp .6
.RS 4n
List all audit records for which the event ID label contains the string
\fIstring\fR. The match is case insensitive.
.RE
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.sp .6
.RS 4n
Generate the output in HTML format.
.RE
.sp
.ne 2
.na
\fB\fB-i\fR \fIid\fR\fR
.ad
.sp .6
.RS 4n
List the audit records having the numeric event ID \fIid\fR.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR \fIprogramname\fR\fR
.ad
.sp .6
.RS 4n
List all audit records generated by the program \fIprogramname\fR, for example,
audit records generated by a user-space program.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIsystemcall\fR\fR
.ad
.sp .6
.RS 4n
List all audit records generated by the system call \fIsystemcall\fR, for
example, audit records generated by a system call.
.RE
.sp
.LP
The \fB-p\fR and \fB-s\fR options are different names for the same thing and
are mutually exclusive. The \fB-a\fR option is ignored if any of \fB-c\fR,
\fB-e\fR, \fB-i\fR, \fB-p\fR, or \fB-s\fR are given. Combinations of \fB-c\fR,
\fB-e\fR, \fB-i\fR, and either \fB-p\fR or \fB-s\fR are ANDed together.
.SH EXAMPLES
.LP
\fBExample 1 \fRDisplaying an Audit Record with a Specified Event ID
.sp
.LP
The following example shows how to display the contents of a specified audit
record.
.sp
.in +2
.nf
% auditrecord -i 6152
terminal login
program /usr/sbin/login see login(1)
/usr/dt/bin/dtlogin See dtlogin
event ID 6152 AUE_login
class lo (0x00001000)
header
subject
[text] error message
return
.fi
.in -2
.sp
.LP
\fBExample 2 \fRDisplaying an Audit Record with an Event ID Label that Contains
a Specified String
.sp
.LP
The following example shows how to display the contents of a audit record with
an event ID label that contains the string \fBlogin\fR.
.sp
.in +2
.nf
# auditrecord -e login
terminal login
program /usr/sbin/login see login(1)
/usr/dt/bin/dtlogin See dtlogin
event ID 6152 AUE_login
class lo (0x00001000)
header
subject
[text] error message
return
rlogin
program /usr/sbin/login see login(1) - rlogin
event ID 6155 AUE_rlogin
class lo (0x00001000)
header
subject
[text] error message
return
.fi
.in -2
.sp
.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.sp .6
.RS 4n
Successful operation
.RE
.sp
.ne 2
.na
\fB\fBnon-zero\fR\fR
.ad
.sp .6
.RS 4n
Error
.RE
.SH FILES
.ne 2
.na
\fB\fB/etc/security/audit_class\fR\fR
.ad
.sp .6
.RS 4n
Provides the list of valid classes and the associated audit mask.
.RE
.sp
.ne 2
.na
\fB\fB/etc/security/audit_event\fR\fR
.ad
.sp .6
.RS 4n
Provides the numeric event ID, the literal event name, and the name of the
associated system call or program.
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
CSI Enabled
_
Interface Stability Obsolete Uncommitted
.TE
.SH SEE ALSO
.LP
\fBauditconfig\fR(1M), \fBpraudit\fR(1M), \fBaudit.log\fR(4),
\fBaudit_class\fR(4), \fBaudit_event\fR(4), \fBattributes\fR(5)
.SH DIAGNOSTICS
.LP
If unable to read either of its input files or to write its output file,
\fBauditrecord\fR shows the name of the file on which it failed and exits with
a non-zero return.
.sp
.LP
If no options are provided, if an invalid option is provided, or if both
\fB-s\fR and \fB-p\fR are provided, an error message is displayed and
\fBauditrecord\fR displays a usage message then exits with a non-zero return.
.SH NOTES
.LP
This command is Obsolete and may be removed and replaced with equivalent
functionality in the future. This command was formerly known as \fBbsmrecord\fR.
.sp
.LP
If \fB/etc/security/audit_event\fR has been modified to add user-defined audit
events, \fBauditrecord\fR displays the record format as \fBundefined\fR.
.sp
.LP
The audit records displayed by \fBauditrecord\fR are the core of the record that
can be produced. Various audit policies and optional tokens, such as those
shown below, might also be present.
.sp
.LP
The following is a list of \fBpraudit\fR(1M) token names with their
descriptions.
.sp
.ne 2
.na
\fB\fBgroup\fR\fR
.ad
.sp .6
.RS 4n
Present if the \fBgroup\fR audit policy is set.
.RE
.sp
.ne 2
.na
\fB\fBsensitivity label\fR\fR
.ad
.sp .6
.RS 4n
Present when Trusted Extensions is enabled and represents the label of the
subject or object with which it is associated. The \fBmandatory_label\fR token
is noted in the basic audit record where a label is explicitly part of the
record.
.RE
.sp
.ne 2
.na
\fB\fBsequence\fR\fR
.ad
.sp .6
.RS 4n
Present when the \fBseq\fR audit policy is set.
.RE
.sp
.ne 2
.na
\fB\fBtrailer\fR\fR
.ad
.sp .6
.RS 4n
Present when the \fBtrail\fR audit policy is set.
.RE
.sp
.ne 2
.na
\fB\fBzone\fR\fR
.ad
.sp .6
.RS 4n
The name of the zone generating the record when the \fBzonename\fR audit policy
is set. The \fBzonename\fR token is noted in the basic audit record where a
zone name is explicitly part of the record.
.RE
|