Main index | Section 5 | Options |
BSM token streams typically begin and end with a "file" token, which provides time stamp and file name information for the stream; when processing a BSM token stream from a stream as opposed to a single file source, file tokens may be seen at any point between ordinary records identifying when particular parts of the stream begin and end. All other tokens will appear in the context of a complete BSM audit record, which begins with a "header" token, and ends with a "trailer" token, which describe the audit record. Between these two tokens will appear a variety of data tokens, such as process information, file path names, IPC object information, MAC labels, socket information, and so on.
The BSM file format defines specific token orders for each record event type; however, some variation may occur depending on the operating system in use, what system options, such as mandatory access control, are present.
This manual page documents the common token types and their binary format, and is intended for reference purposes only. It is recommended that application programmers use the libbsm(3) interface to read and write tokens, rather than parsing or constructing records by hand.
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Seconds Ta 4 bytes | File time stamp |
Microseconds Ta 4 bytes | File time stamp |
File name length Ta 2 bytes | File name of audit trail |
File pathname Ta N bytes + 1 NUL | File name of audit trail |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Record Byte Count Ta 4 bytes | Number of bytes in record |
Version Number Ta 2 bytes | Record version number |
Event Type Ta 2 bytes | Event type |
Event Modifier Ta 2 bytes | Event sub-type |
Seconds Ta 4/8 bytes | Record time stamp (32/64-bits) |
Nanoseconds Ta 4/8 bytes | Record time stamp (32/64-bits) |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Record Byte Count Ta 4 bytes | Number of bytes in record |
Version Number Ta 2 bytes | Record version number |
Event Type Ta 2 bytes | Event type |
Event Modifier Ta 2 bytes | Event sub-type |
Address Type/Length Ta 1 byte | Host address type and length |
Machine Address Ta 4/16 bytes | IPv4 or IPv6 address |
Seconds Ta 4/8 bytes | Record time stamp (32/64-bits) |
Nanoseconds Ta 4/8 bytes | Record time stamp (32/64-bits) |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Trailer Magic Ta 2 bytes | Trailer magic number |
Record Byte Count Ta 4 bytes | Number of bytes in record |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
How to Print Ta 1 byte | User-defined printing information |
Basic Unit Ta 1 byte | Size of a unit in bytes |
Unit Count Ta 1 byte | Number of units of data present |
Data Items Ta Variable | User data |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
IP Address Ta 4 bytes | IPv4 address |
See the BUGS section for information on the storage of this token.
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
IP Address Type Ta 1 byte | Type of address |
IP Address Ta 4/16 bytes | IPv4 or IPv6 address |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Version and IHL Ta 1 byte | Version and IP header length |
Type of Service Ta 1 byte | IP TOS field |
Length Ta 2 bytes | IP packet length in network byte order |
ID Ta 2 bytes | IP header ID for reassembly |
Offset Ta 2 bytes | IP fragment offset and flags, network byte order |
TTL Ta 1 byte | IP Time-to-Live |
Protocol Ta 1 byte | IP protocol number |
Checksum Ta 2 bytes | IP header checksum, network byte order |
Source Address Ta 4 bytes | IPv4 source address |
Destination Address Ta 4 bytes | IPv4 destination address |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Port Number Ta 2 bytes | Port number in network byte order |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Path Length Ta 2 bytes | Length of path in bytes |
Path Ta N bytes + 1 NUL | Path name |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Count Ta 2 bytes | Number of NUL-terminated string(s) in token |
Path Ta Variable | count NUL-terminated string(s) |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Audit ID Ta 4 bytes | Audit user ID |
Effective User ID Ta 4 bytes | Effective user ID |
Effective Group ID Ta 4 bytes | Effective group ID |
Real User ID Ta 4 bytes | Real user ID |
Real Group ID Ta 4 bytes | Real group ID |
Process ID Ta 4 bytes | Process ID |
Session ID Ta 4 bytes | Audit session ID |
Terminal Port ID Ta 4/8 bytes | Terminal port ID (32/64-bits) |
Terminal Machine Address Ta 4 bytes | IP address of machine |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Audit ID Ta 4 bytes | Audit user ID |
Effective User ID Ta 4 bytes | Effective user ID |
Effective Group ID Ta 4 bytes | Effective group ID |
Real User ID Ta 4 bytes | Real user ID |
Real Group ID Ta 4 bytes | Real group ID |
Process ID Ta 4 bytes | Process ID |
Session ID Ta 4 bytes | Audit session ID |
Terminal Port ID Ta 4/8 bytes | Terminal port ID (32/64-bits) |
Terminal Address Type/Length Ta 1 byte | Length of machine address |
Terminal Machine Address Ta 4 bytes | IPv4 or IPv6 address of machine |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Error Number Ta 1 byte | Errno value, or 0 if undefined |
Return Value Ta 4/8 bytes | Return value (32/64-bits) |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Audit ID Ta 4 bytes | Audit user ID |
Effective User ID Ta 4 bytes | Effective user ID |
Effective Group ID Ta 4 bytes | Effective group ID |
Real User ID Ta 4 bytes | Real user ID |
Real Group ID Ta 4 bytes | Real group ID |
Process ID Ta 4 bytes | Process ID |
Session ID Ta 4 bytes | Audit session ID |
Terminal Port ID Ta 4/8 bytes | Terminal port ID (32/64-bits) |
Terminal Machine Address Ta 4 bytes | IP address of machine |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Audit ID Ta 4 bytes | Audit user ID |
Effective User ID Ta 4 bytes | Effective user ID |
Effective Group ID Ta 4 bytes | Effective group ID |
Real User ID Ta 4 bytes | Real user ID |
Real Group ID Ta 4 bytes | Real group ID |
Process ID Ta 4 bytes | Process ID |
Session ID Ta 4 bytes | Audit session ID |
Terminal Port ID Ta 4/8 bytes | Terminal port ID (32/64-bits) |
Terminal Address Type/Length Ta 1 byte | Length of machine address |
Terminal Machine Address Ta 4 bytes | IPv4 or IPv6 address of machine |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Object ID type Ta 1 byte | Object ID |
Object ID Ta 4 bytes | Object ID |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Text Length Ta 2 bytes | Length of text string including NUL |
Text Ta N bytes + 1 NUL | Text string including NUL |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
File Access Mode Ta 1 byte | mode_t associated with file |
Owner User ID Ta 4 bytes | uid_t associated with file |
Owner Group ID Ta 4 bytes | gid_t associated with file |
File System ID Ta 4 bytes | fsid_t associated with file |
File System Node ID Ta 8 bytes | ino_t associated with file |
Device Ta 4/8 bytes | Device major/minor number (32/64-bit) |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Number of Groups Ta 2 bytes | Number of groups in token |
Group List Ta N * 4 bytes | List of N group IDs |
Field Ta Bytes | Description | |
Token ID Ta 1 byte | Token ID | |
Owner user ID | 4 bytes | User ID of IPC owner |
Owner group ID | 4 bytes | Group ID of IPC owner |
Creator user ID | 4 bytes | User ID of IPC creator |
Creator group ID | 4 bytes | Group ID of IPC creator |
Access mode | 4 bytes | Access mode |
Sequence number | 4 bytes | Sequence number |
Key | 4 bytes | IPC key |
Field Ta Bytes | Description | |
Token ID Ta 1 byte | Token ID | |
Argument ID | 1 byte | Argument ID |
Argument value | 4/8 bytes | Argument value |
Length | 2 bytes | Length of the text |
Text | N bytes + 1 nul | The string including nul |
Field Ta Bytes | Description | |
Token ID Ta 1 byte | Token ID | |
Count | 4 bytes | Number of arguments |
Text | * bytes | Count nul-terminated strings |
Field Ta Bytes | Description | |
Token ID Ta 1 byte | Token ID | |
Count ID | 4 bytes | Number of variables |
Text | * bytes | Count nul-terminated strings |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Status Ta 4 bytes | Process status on exit |
Return Value Ta 4 bytes | Process return value on exit |
Field | Bytes | Description |
Token ID | 1 byte | Token ID |
Socket family | 2 bytes | Socket family |
Local port | 2 bytes | Local port |
Socket address | 4 bytes | Socket address |
Field Ta Bytes | Description | |
Token ID | 1 byte | Token ID |
Socket domain | 2 bytes | Socket domain |
Socket type | 2 bytes | Socket type |
Address type | 2 byte | Address type (IPv4/IPv6) |
Local port | 2 bytes | Local port |
Local IP address | 4/16 bytes | Local IP address |
Remote port | 2 bytes | Remote port |
Remote IP address | 4/16 bytes | Remote IP address |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Sequence Number Ta 4 bytes | Audit event sequence number |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Field Ta Bytes | Description |
Token ID Ta 1 byte | Token ID |
Zonename length Ta 2 bytes | Length of zonename string including NUL |
Zonename Ta N bytes + 1 NUL | Zonename string including NUL |
This manual page was written by Robert Watson <rwatson@FreeBSD.org>.
The "in_addr" and "in_addr_ex" token layout documented here appears to be in conflict with the libbsm(3) implementation of au_to_in_addr_ex(3).
AUDIT.LOG (5) | November 5, 2006 |
Main index | Section 5 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | The Unix phenomenon is scary. It doesn't go away. | ” |
— Steve Ballmer |