Compresses and uncompresses audit bins.
Security Library (libc.a)
The auditpack subroutine can be used to compress or uncompress bins of audit records.
| Item | Description |
|---|---|
| Expand | Specifies the operation. Valid values, as defined in the sys/audit.h header
file, are one of the following:
|
| Buffer | Specifies the buffer containing the bin to be compressed or uncompressed. This buffer must contain a standard bin as described in the audit.h file. |
If the auditpack subroutine is successful, a pointer to a buffer containing the processed audit bin is returned. If unsuccessful, a null pointer is returned and the errno global variable is set to indicate the error.
The auditpack subroutine fails if one or more of the following values is true:
| Item | Description |
|---|---|
| EINVAL | The Expand parameter is not one of the valid values (AUDIT_PACK or AUDIT_UNPACK). |
| EINVAL | The Expand parameter is AUDIT_UNPACK and the packed data in Buffer does not unpack to its original size. |
| EINVAL | The Expand parameter is AUDIT_PACK and the bin in the Buffer parameter is already compressed, or the Expand parameter is AUDIT_UNPACK and the bin in the Buffer parameter is already unpacked. |
| ENOSPC | The auditpack subroutine is unable to allocate space for a new buffer. |