8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / auditrecord.1m
blobffc3514bc770db313b91d4054dbfea06fee39d0d
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH AUDITRECORD 1M "Mar 6, 2017"
7 .SH NAME
8 auditrecord \- display audit record formats
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/auditrecord\fR [\fB-d\fR] [ [\fB-a\fR] | [\fB-e\fR \fIstring\fR] | [\fB-c\fR \fIclass\fR] |
13       [\fB-i\fR \fIid\fR] | [\fB-p\fR \fIprogramname\fR] | [\fB-s\fR \fIsystemcall\fR] | [\fB-h\fR]]
14 .fi
16 .SH DESCRIPTION
17 .LP
18 The \fBauditrecord\fR utility displays the event ID, audit class and selection
19 mask, and record format for audit record event types defined in
20 \fBaudit_event\fR(4). You can use \fBauditrecord\fR to generate a list of all
21 audit record formats, or to select audit record formats based on event class,
22 event name, generating program name, system call name, or event ID.
23 .sp
24 .LP
25 There are two output formats. The default format is intended for display in a
26 terminal window; the optional HTML format is intended for viewing with a web
27 browser.
28 .sp
29 .LP
30 Tokens contained in square brackets ( \fB[ ]\fR ) are optional and might not be
31 present in every record.
32 .SH OPTIONS
33 .LP
34 The following options are supported:
35 .sp
36 .ne 2
37 .na
38 \fB\fB-a\fR\fR
39 .ad
40 .sp .6
41 .RS 4n
42 List all audit records.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fB-c\fR \fIclass\fR\fR
49 .ad
50 .sp .6
51 .RS 4n
52 List all audit records selected by \fIclass\fR. \fIclass\fR is one of the
53 two-character class codes from the file \fB/etc/security/audit_class\fR.
54 .RE
56 .sp
57 .ne 2
58 .na
59 \fB\fB-d\fR\fR
60 .ad
61 .sp .6
62 .RS 4n
63 Debug mode. Display number of audit records that are defined in
64 \fBaudit_event\fR, the number of classes defined in \fBaudit_class\fR, any
65 mismatches between the two files, and report which defined events do not have
66 format information available to \fBauditrecord\fR.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fB-e\fR \fIstring\fR\fR
73 .ad
74 .sp .6
75 .RS 4n
76 List all audit records for which the event ID label contains the string
77 \fIstring\fR. The match is case insensitive.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-h\fR\fR
84 .ad
85 .sp .6
86 .RS 4n
87 Generate the output in HTML format.
88 .RE
90 .sp
91 .ne 2
92 .na
93 \fB\fB-i\fR \fIid\fR\fR
94 .ad
95 .sp .6
96 .RS 4n
97 List the audit records having the numeric event ID \fIid\fR.
98 .RE
101 .ne 2
103 \fB\fB-p\fR \fIprogramname\fR\fR
105 .sp .6
106 .RS 4n
107 List all audit records generated by the program \fIprogramname\fR, for example,
108 audit records generated by a user-space program.
112 .ne 2
114 \fB\fB-s\fR \fIsystemcall\fR\fR
116 .sp .6
117 .RS 4n
118 List all audit records generated by the system call \fIsystemcall\fR, for
119 example, audit records generated by a system call.
124 The \fB-p\fR and \fB-s\fR options are different names for the same thing and
125 are mutually exclusive. The \fB-a\fR option is ignored if any of \fB-c\fR,
126 \fB-e\fR, \fB-i\fR, \fB-p\fR, or \fB-s\fR are given. Combinations of \fB-c\fR,
127 \fB-e\fR, \fB-i\fR, and either \fB-p\fR or \fB-s\fR are ANDed together.
128 .SH EXAMPLES
130 \fBExample 1 \fRDisplaying an Audit Record with a Specified Event ID
133 The following example shows how to display the contents of a specified audit
134 record.
137 .in +2
139 % auditrecord -i 6152
140   terminal login
141   program     /usr/sbin/login      see login(1)
142               /usr/dt/bin/dtlogin  See dtlogin
143   event ID    6152                 AUE_login
144   class       lo                   (0x00001000)
145       header
146       subject
147       [text]                       error message
148       return
150 .in -2
154 \fBExample 2 \fRDisplaying an Audit Record with an Event ID Label that Contains
155 a Specified String
158 The following example shows how to display the contents of a audit record with
159 an event ID label that contains the string \fBlogin\fR.
162 .in +2
164 # auditrecord -e login
165 terminal login
166   program     /usr/sbin/login      see login(1)
167               /usr/dt/bin/dtlogin  See dtlogin
168   event ID    6152                 AUE_login
169   class       lo                   (0x00001000)
170       header
171       subject
172       [text]                       error message
173       return
175 rlogin
176   program     /usr/sbin/login      see login(1) - rlogin
177   event ID    6155                 AUE_rlogin
178   class       lo                   (0x00001000)
179       header
180       subject
181       [text]                       error message
182       return
184 .in -2
187 .SH EXIT STATUS
188 .ne 2
190 \fB\fB0\fR\fR
192 .sp .6
193 .RS 4n
194 Successful operation
198 .ne 2
200 \fB\fBnon-zero\fR\fR
202 .sp .6
203 .RS 4n
204 Error
207 .SH FILES
208 .ne 2
210 \fB\fB/etc/security/audit_class\fR\fR
212 .sp .6
213 .RS 4n
214 Provides the list of valid classes and the associated audit mask.
218 .ne 2
220 \fB\fB/etc/security/audit_event\fR\fR
222 .sp .6
223 .RS 4n
224 Provides the numeric event ID, the literal event name, and the name of the
225 associated system call or program.
228 .SH ATTRIBUTES
230 See \fBattributes\fR(5) for descriptions of the following attributes:
235 box;
236 c | c
237 l | l .
238 ATTRIBUTE TYPE  ATTRIBUTE VALUE
240 CSI     Enabled
242 Interface Stability     Obsolete Uncommitted
245 .SH SEE ALSO
247 \fBauditconfig\fR(1M), \fBpraudit\fR(1M), \fBaudit.log\fR(4),
248 \fBaudit_class\fR(4), \fBaudit_event\fR(4), \fBattributes\fR(5)
249 .SH DIAGNOSTICS
251 If unable to read either of its input files or to write its output file,
252 \fBauditrecord\fR shows the name of the file on which it failed and exits with
253 a non-zero return.
256 If no options are provided, if an invalid option is provided, or if both
257 \fB-s\fR and \fB-p\fR are provided, an error message is displayed and
258 \fBauditrecord\fR displays a usage message then exits with a non-zero return.
259 .SH NOTES
261 This command is Obsolete and may be removed and replaced with equivalent
262 functionality in the future. This command was formerly known as \fBbsmrecord\fR.
265 If \fB/etc/security/audit_event\fR has been modified to add user-defined audit
266 events, \fBauditrecord\fR displays the record format as \fBundefined\fR.
269 The audit records displayed by \fBauditrecord\fR are the core of the record that
270 can be produced. Various audit policies and optional tokens, such as those
271 shown below, might also be present.
274 The following is a list of \fBpraudit\fR(1M) token names with their
275 descriptions.
277 .ne 2
279 \fB\fBgroup\fR\fR
281 .sp .6
282 .RS 4n
283 Present if the \fBgroup\fR audit policy is set.
287 .ne 2
289 \fB\fBsensitivity label\fR\fR
291 .sp .6
292 .RS 4n
293 Present when Trusted Extensions is enabled and represents the label of the
294 subject or object with which it is associated. The \fBmandatory_label\fR token
295 is noted in the basic audit record where a label is explicitly part of the
296 record.
300 .ne 2
302 \fB\fBsequence\fR\fR
304 .sp .6
305 .RS 4n
306 Present when the \fBseq\fR audit policy is set.
310 .ne 2
312 \fB\fBtrailer\fR\fR
314 .sp .6
315 .RS 4n
316 Present when the \fBtrail\fR audit policy is set.
320 .ne 2
322 \fB\fBzone\fR\fR
324 .sp .6
325 .RS 4n
326 The name of the zone generating the record when the \fBzonename\fR audit policy
327 is set. The \fBzonename\fR token is noted in the basic audit record where a
328 zone name is explicitly part of the record.