Skip to content
BSD syscall#355

svc · unix #355

getaudit

Legacy 32-bit accessor for the calling process's audit information.

Prototype

int getaudit(struct auditinfo *auditinfo);

Returns: int

Arguments

NameTypeDirDescription
auditinfostruct auditinfo-

Version history

XNU tagmacOS#
xnu-1456.1.26macOS 10.6 Snow Leopard355
xnu-1699.24.8macOS 10.7 Lion355
xnu-1486.2.11355
xnu-1504.15.3355
xnu-1504.3.12355
xnu-1504.7.4355
xnu-1504.9.17355
xnu-1504.9.26355
xnu-1504.9.37355
xnu-1699.22.73355
xnu-1699.22.81355
xnu-1699.24.23355
xnu-1699.26.8355
xnu-1699.32.7355

Notes

getaudit(2) populates a struct auditinfo with the auid, mask, asid and a 32-bit termid. It was superseded by getaudit_addr(2), which carries a wider termid_addr capable of holding an IPv6 address, and is now stubbed to return ERANGE on hosts whose terminal id doesn't fit. New code must use getaudit_addr.

Detection

Calls from modern binaries are a portability smell rather than a security event; emits AUE_GETAUDIT.

Related APIs

getaudit_addrsetauditsetaudit_addrgetauid