6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / auditrecord.1m
blob1ae35b5809ffbcb1a9897edd7057c995daceb7de
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 "May 13, 2009"
7 .SH NAME
8 auditrecord \- display Solaris 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 .sp
18 .LP
19 The \fBauditrecord\fR utility displays the event ID, audit class and selection
20 mask, and record format for audit record event types defined in
21 \fBaudit_event\fR(4). You can use \fBauditrecord\fR to generate a list of all
22 audit record formats, or to select audit record formats based on event class,
23 event name, generating program name, system call name, or event ID.
24 .sp
25 .LP
26 There are two output formats. The default format is intended for display in a
27 terminal window; the optional HTML format is intended for viewing with a web
28 browser.
29 .sp
30 .LP
31 Tokens contained in square brackets ( \fB[ ]\fR ) are optional and might not be
32 present in every record.
33 .SH OPTIONS
34 .sp
35 .LP
36 The following options are supported:
37 .sp
38 .ne 2
39 .na
40 \fB\fB-a\fR\fR
41 .ad
42 .sp .6
43 .RS 4n
44 List all audit records.
45 .RE
47 .sp
48 .ne 2
49 .na
50 \fB\fB-c\fR \fIclass\fR\fR
51 .ad
52 .sp .6
53 .RS 4n
54 List all audit records selected by \fIclass\fR. \fIclass\fR is one of the
55 two-character class codes from the file \fB/etc/security/audit_class\fR.
56 .RE
58 .sp
59 .ne 2
60 .na
61 \fB\fB-d\fR\fR
62 .ad
63 .sp .6
64 .RS 4n
65 Debug mode. Display number of audit records that are defined in
66 \fBaudit_event\fR, the number of classes defined in \fBaudit_class\fR, any
67 mismatches between the two files, and report which defined events do not have
68 format information available to \fBauditrecord\fR.
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fB-e\fR \fIstring\fR\fR
75 .ad
76 .sp .6
77 .RS 4n
78 List all audit records for which the event ID label contains the string
79 \fIstring\fR. The match is case insensitive.
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fB\fB-h\fR\fR
86 .ad
87 .sp .6
88 .RS 4n
89 Generate the output in HTML format.
90 .RE
92 .sp
93 .ne 2
94 .na
95 \fB\fB-i\fR \fIid\fR\fR
96 .ad
97 .sp .6
98 .RS 4n
99 List the audit records having the numeric event ID \fIid\fR.
103 .ne 2
105 \fB\fB-p\fR \fIprogramname\fR\fR
107 .sp .6
108 .RS 4n
109 List all audit records generated by the program \fIprogramname\fR, for example,
110 audit records generated by a user-space program.
114 .ne 2
116 \fB\fB-s\fR \fIsystemcall\fR\fR
118 .sp .6
119 .RS 4n
120 List all audit records generated by the system call \fIsystemcall\fR, for
121 example, audit records generated by a system call.
126 The \fB-p\fR and \fB-s\fR options are different names for the same thing and
127 are mutually exclusive. The \fB-a\fR option is ignored if any of \fB-c\fR,
128 \fB-e\fR, \fB-i\fR, \fB-p\fR, or \fB-s\fR are given. Combinations of \fB-c\fR,
129 \fB-e\fR, \fB-i\fR, and either \fB-p\fR or \fB-s\fR are ANDed together.
130 .SH EXAMPLES
132 \fBExample 1 \fRDisplaying an Audit Record with a Specified Event ID
135 The following example shows how to display the contents of a specified audit
136 record.
139 .in +2
141 % auditrecord -i 6152
142   terminal login
143   program     /usr/sbin/login      see login(1)
144               /usr/dt/bin/dtlogin  See dtlogin
145   event ID    6152                 AUE_login
146   class       lo                   (0x00001000)
147       header
148       subject
149       [text]                       error message
150       return
152 .in -2
156 \fBExample 2 \fRDisplaying an Audit Record with an Event ID Label that Contains
157 a Specified String
160 The following example shows how to display the contents of a audit record with
161 an event ID label that contains the string \fBlogin\fR.
164 .in +2
166 # auditrecord -e login
167 terminal login
168   program     /usr/sbin/login      see login(1)
169               /usr/dt/bin/dtlogin  See dtlogin
170   event ID    6152                 AUE_login
171   class       lo                   (0x00001000)
172       header
173       subject
174       [text]                       error message
175       return
177 rlogin
178   program     /usr/sbin/login      see login(1) - rlogin
179   event ID    6155                 AUE_rlogin
180   class       lo                   (0x00001000)
181       header
182       subject
183       [text]                       error message
184       return
186 .in -2
189 .SH EXIT STATUS
191 .ne 2
193 \fB\fB0\fR\fR
195 .sp .6
196 .RS 4n
197 Successful operation
201 .ne 2
203 \fB\fBnon-zero\fR\fR
205 .sp .6
206 .RS 4n
207 Error
210 .SH FILES
212 .ne 2
214 \fB\fB/etc/security/audit_class\fR\fR
216 .sp .6
217 .RS 4n
218 Provides the list of valid classes and the associated audit mask.
222 .ne 2
224 \fB\fB/etc/security/audit_event\fR\fR
226 .sp .6
227 .RS 4n
228 Provides the numeric event ID, the literal event name, and the name of the
229 associated system call or program.
232 .SH ATTRIBUTES
235 See \fBattributes\fR(5) for descriptions of the following attributes:
240 box;
241 c | c
242 l | l .
243 ATTRIBUTE TYPE  ATTRIBUTE VALUE
245 CSI     Enabled
247 Interface Stability     Obsolete Uncommitted
250 .SH SEE ALSO
253 \fBauditconfig\fR(1M), \fBpraudit\fR(1M), \fBaudit.log\fR(4),
254 \fBaudit_class\fR(4), \fBaudit_event\fR(4), \fBattributes\fR(5)
257 See the section on Solaris Auditing in \fISystem Administration Guide: Security
258 Services\fR.
259 .SH DIAGNOSTICS
262 If unable to read either of its input files or to write its output file,
263 \fBauditrecord\fR shows the name of the file on which it failed and exits with
264 a non-zero return.
267 If no options are provided, if an invalid option is provided, or if both
268 \fB-s\fR and \fB-p\fR are provided, an error message is displayed and
269 \fBauditrecord\fR displays a usage message then exits with a non-zero return.
270 .SH NOTES
273 This command is Obsolete and may be removed and replaced with equivalent
274 functionality in a future release of Solaris. This command was formerly known
275 as \fBbsmrecord\fR.
278 If \fB/etc/security/audit_event\fR has been modified to add user-defined audit
279 events, \fBauditrecord\fR displays the record format as \fBundefined\fR.
282 The audit records displayed by \fBbsmrecord\fR are the core of the record that
283 can be produced. Various audit policies and optional tokens, such as those
284 shown below, might also be present.
287 The following is a list of \fBpraudit\fR(1M) token names with their
288 descriptions.
290 .ne 2
292 \fB\fBgroup\fR\fR
294 .sp .6
295 .RS 4n
296 Present if the \fBgroup\fR audit policy is set.
300 .ne 2
302 \fB\fBsensitivity label\fR\fR
304 .sp .6
305 .RS 4n
306 Present when Trusted Extensions is enabled and represents the label of the
307 subject or object with which it is associated. The \fBmandatory_label\fR token
308 is noted in the basic audit record where a label is explicitly part of the
309 record.
313 .ne 2
315 \fB\fBsequence\fR\fR
317 .sp .6
318 .RS 4n
319 Present when the \fBseq\fR audit policy is set.
323 .ne 2
325 \fB\fBtrailer\fR\fR
327 .sp .6
328 .RS 4n
329 Present when the \fBtrail\fR audit policy is set.
333 .ne 2
335 \fB\fBzone\fR\fR
337 .sp .6
338 .RS 4n
339 The name of the zone generating the record when the \fBzonename\fR audit policy
340 is set. The \fBzonename\fR token is noted in the basic audit record where a
341 zone name is explicitly part of the record.