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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
'\" te
.\" Copyright (c) 2017 Peter Tribble
.\" Copyright (c) 2009, 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 AUDIT.LOG 4 "Mar 6, 2017"
.SH NAME
audit.log \- audit trail file
.SH SYNOPSIS
.LP
.nf
\fB#include <bsm/audit.h>\fR
.fi
.LP
.nf
\fB#include <bsm/audit_record.h>\fR
.fi
.SH DESCRIPTION
.LP
\fBaudit.log\fR files are the depository for audit records stored locally or on
an NFS-mounted audit server. These files are kept in directories as specified
by the \fBp_dir\fR attribute of the \fBaudit_binfile\fR(5) plugin. They are
named to reflect the time they are created and are, when possible, renamed to
reflect the time they are closed as well. The name takes the form
.sp
.LP
\fIyyyymmddhhmmss\fR\fB\&.not_terminated.\fR\fIhostname\fR
.sp
.LP
when open or if \fBauditd\fR(1M) terminated ungracefully, and the form
.sp
.LP
\fIyyyymmddhhmmss\fR\fB\&.\fR\fIyyyymmddhhmmss\fR\fB\&.\fR\fIhostname\fR
.sp
.LP
when properly closed. \fByyyy\fR is the year, \fBmm\fR the month, \fBdd\fR day
in the month, \fBhh\fR hour in the day, \fBmm\fR minute in the hour, and
\fBss\fR second in the minute. All fields are of fixed width.
.sp
.LP
Audit data is generated in the binary format described below; the default for
audit is binary format. See \fBaudit_syslog\fR(5) for an alternate data
format.
.sp
.LP
The \fBaudit.log\fR file begins with a standalone \fBfile token\fR and
typically ends with one also. The beginning \fBfile token\fR records the
pathname of the previous audit file, while the ending \fBfile token\fR records
the pathname of the next audit file. If the file name is \fBNULL\fR the
appropriate path was unavailable.
.sp
.LP
The \fBaudit.log\fR files contains audit records. Each audit record is made up
of \fIaudit tokens\fR. Each record contains a header token followed by various
data tokens. Depending on the audit policy in place by \fBauditon\fR(2),
optional other tokens such as trailers or sequences may be included.
.sp
.LP
The tokens are defined as follows:
.sp
.LP
The \fBfile\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
seconds of time 4 bytes
microseconds of time 4 bytes
file name length 2 bytes
file pathname N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.sp
.LP
The \fBheader\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
record byte count 4 bytes
version # 1 byte [2]
event type 2 bytes
event modifier 2 bytes
seconds of time 4 bytes/8 bytes (32-bit/64-bit value)
nanoseconds of time 4 bytes/8 bytes (32-bit/64-bit value)
.fi
.in -2
.sp
.sp
.LP
The expanded \fBheader\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
record byte count 4 bytes
version # 1 byte [2]
event type 2 bytes
event modifier 2 bytes
address type/length 1 byte
machine address 4 bytes/16 bytes (IPv4/IPv6 address)
seconds of time 4 bytes/8 bytes (32/64-bits)
nanoseconds of time 4 bytes/8 bytes (32/64-bits)
.fi
.in -2
.sp
.sp
.LP
The \fBtrailer\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
trailer magic number 2 bytes
record byte count 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBarbitrary\fR \fBdata\fR token is defined:
.sp
.in +2
.nf
token ID 1 byte
how to print 1 byte
basic unit 1 byte
unit count 1 byte
data items (depends on basic unit)
.fi
.in -2
.sp
.sp
.LP
The \fBin_addr\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
IP address type/length 1 byte
IP address 4 bytes/16 bytes (IPv4/IPv6 address)
.fi
.in -2
.sp
.sp
.LP
The expanded \fBin_addr\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
IP address type/length 4 bytes/16 bytes (IPv4/IPv6 address)
IP address 16 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBip\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
version and ihl 1 byte
type of service 1 byte
length 2 bytes
id 2 bytes
offset 2 bytes
ttl 1 byte
protocol 1 byte
checksum 2 bytes
source address 4 bytes
destination address 4 bytes
.fi
.in -2
.sp
.sp
.LP
The expanded \fBip\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
version and ihl 1 byte
type of service 1 byte
length 2 bytes
id 2 bytes
offset 2 bytes
ttl 1 byte
protocol 1 byte
checksum 2 bytes
address type/type 1 byte
source address 4 bytes/16 bytes (IPv4/IPv6 address)
address type/length 1 byte
destination address 4 bytes/16 bytes (IPv4/IPv6 address)
.fi
.in -2
.sp
.sp
.LP
The \fBiport\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
port IP address 2 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBpath\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
path length 2 bytes
path N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.sp
.LP
The \fBpath_attr\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
count 4 bytes
path \fIcount\fR null-terminated string(s)
.fi
.in -2
.sp
.sp
.LP
The \fBprocess\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
audit ID 4 bytes
effective user ID 4 bytes
effective group ID 4 bytes
real user ID 4 bytes
real group ID 4 bytes
process ID 4 bytes
session ID 4 bytes
terminal ID
port ID 4 bytes/8 bytes (32-bit/64-bit value)
machine address 4 bytes
.fi
.in -2
.sp
.sp
.LP
The expanded \fBprocess\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
audit ID 4 bytes
effective user ID 4 bytes
effective group ID 4 bytes
real user ID 4 bytes
real group ID 4 bytes
process ID 4 bytes
session ID 4 bytes
terminal ID
port ID 4 bytes/8 bytes (32-bit/64-bit value)
address type/length 1 byte
machine address 4 bytes/16 bytes (IPv4/IPv6 address)
.fi
.in -2
.sp
.sp
.LP
The \fBreturn\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
error number 1 byte
return value 4 bytes/8 bytes (32-bit/64-bit value)
.fi
.in -2
.sp
.sp
.LP
The \fBsubject\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
audit ID 4 bytes
effective user ID 4 bytes
effective group ID 4 bytes
real user ID 4 bytes
real group ID 4 bytes
process ID 4 bytes
session ID 4 bytes
terminal ID
port ID 4 bytes/8 bytes (32-bit/64-bit value)
machine address 4 bytes
.fi
.in -2
.sp
.sp
.LP
The expanded \fBsubject\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
audit ID 4 bytes
effective user ID 4 bytes
effective group ID 4 bytes
real user ID 4 bytes
real group ID 4 bytes
process ID 4 bytes
session ID 4 bytes
terminal ID
port ID 4 bytes/8 bytes (32-bit/64-bit value)
address type/length 1 byte
machine address 4 bytes/16 bytes (IPv4/IPv6 address)
.fi
.in -2
.sp
.sp
.LP
The \fBSystem V IPC\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
object ID type 1 byte
object ID 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBtext\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
text length 2 bytes
text N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.sp
.LP
The \fBattribute\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
file access mode 4 bytes
owner user ID 4 bytes
owner group ID 4 bytes
file system ID 4 bytes
node ID 8 bytes
device 4 bytes/8 bytes (32-bit/64-bit)
.fi
.in -2
.sp
.sp
.LP
The \fBgroups\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
number groups 2 bytes
group list N * 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBSystem V IPC permission\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
owner user ID 4 bytes
owner group ID 4 bytes
creator user ID 4 bytes
creator group ID 4 bytes
access mode 4 bytes
slot sequence # 4 bytes
key 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBarg\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
argument # 1 byte
argument value 4 bytes/8 bytes (32-bit/64-bit value)
text length 2 bytes
text N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.sp
.LP
The \fBexec_args\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
count 4 bytes
text \fIcount\fR null-terminated string(s)
.fi
.in -2
.sp
.sp
.LP
The \fBexec_env\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
count 4 bytes
text \fIcount\fR null-terminated string(s)
.fi
.in -2
.sp
.sp
.LP
The \fBexit\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
status 4 bytes
return value 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBsocket\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
socket type 2 bytes
remote port 2 bytes
remote Internet address 4 bytes
.fi
.in -2
.sp
.sp
.LP
The expanded \fBsocket\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
socket domain 2 bytes
socket type 2 bytes
local port 2 bytes
address type/length 2 bytes
local port 2 bytes
local Internet address 4 bytes/16 bytes (IPv4/IPv6 address)
remote port 2 bytes
remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address)
.fi
.in -2
.sp
.sp
.LP
The \fBseq\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
sequence number 4 bytes
.fi
.in -2
.sp
.sp
.LP
The \fBprivilege\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
text length 2 bytes
privilege set name N bytes + 1 terminating NULL byte
text length 2 bytes
list of privileges N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBuse-of-auth\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
text length 2 bytes
authorization(s) N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBuse-of-privilege\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
succ/fail 1 byte
text length 2 bytes
privilege used N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBcommand\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
count of args 2 bytes
argument list (count times)
text length 2 bytes
argument text N bytes + 1 terminating NULL byte
count of env strings 2 bytes
environment list (count times)
text length 2 bytes
env. text N bytes + 1 terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBACL\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
type 4 bytes
value 4 bytes
file mode 4 bytes
.fi
.in -2
.sp
.LP
The ACE token consists of:
.sp
.in +2
.nf
token ID 1 byte
who 4 bytes
access_mask 4 bytes
flags 2 bytes
type 2 bytes
.fi
.in -2
.sp
.LP
The \fBzonename\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
name length 2 bytes
name \fI<name length>\fR including terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBfmri\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
fmri length 2 bytes
fmri \fI<fmri length>\fR including terminating NULL byte
.fi
.in -2
.sp
.LP
The \fBlabel\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
label ID 1 byte
compartment length 1 byte
classification 2 bytes
compartment words \fI<compartment length>\fR * 4 bytes
.fi
.in -2
.sp
.LP
The \fBxatom\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
string length 2 bytes
atom string \fIstring length\fR bytes
.fi
.in -2
.sp
.LP
The \fBxclient\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
client ID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxcolormap\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxcursor\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxfont\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxgc\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxpixmap\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.sp
.LP
The \fBxproperty\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
string length 2 bytes
string \fIstring length\fR bytes
.fi
.in -2
.sp
.LP
The \fBxselect\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
property length 2 bytes
property string \fIproperty length\fR bytes
prop. type len. 2 bytes
prop type \fIprop. type len.\fR bytes
data length 2 bytes
window data \fIdata length\fR bytes
.fi
.in -2
.sp
.LP
The \fBxwindow\fR token consists of:
.sp
.in +2
.nf
token ID 1 byte
XID 4 bytes
creator UID 4 bytes
.fi
.in -2
.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
_
Interface Stability See below.
.TE
.sp
.LP
The binary file format is Committed. The binary file contents is Uncommitted.
.SH SEE ALSO
.LP
\fBaudit\fR(1M), \fBauditd\fR(1M), \fBaudit\fR(2),
\fBauditon\fR(2), \fBau_to\fR(3BSM),
\fBaudit_binfile\fR(5), \fBaudit_remote\fR(5), \fBaudit_syslog\fR(5)
.SH NOTES
.LP
Each token is generally written using the \fBau_to\fR(3BSM) family of function
calls.
|