GETAUID(2)
β¨ GETAUID π (section 2 of the System Calls Manual, bestie)
okay so this is a system call page, it lives in section 2, and it's literally called getauid β it's giving "retrieve audit session ID" energy πΈ
π NAME π
getauid β retrieve audit session ID π
π¦ SYNOPSIS π¦
#include <bsm/audit.h>
int
getauid(au_id_t *auid);
π DESCRIPTION π
so the getauid() system call retrieves the active audit session ID for the current process, and it hands it back through the au_id_t that auid points at. no cap. π
heads up bestie: this system call requires an appropriate privilege to complete. so likeβ¦ if you don't have it, it's not happening. π«
β¨ RETURN VALUES β¨
upon successful completion, the value 0 is returned. π₯³
otherwise, the value -1 is returned and the global variable errno is set to indicate the error. π classic.
π ERRORS π
the getauid() function will fail if:
[EFAULT]β a failure occurred while data transferred from the kernel failed. π[EPERM]β the process does not have sufficient permission to complete the operation. π (it's giving "not you, not today")
π SEE ALSO π
audit(2), auditon(2), getaudit(2), getaudit_addr(2), setaudit(2), setaudit_addr(2), setauid(2), libbsm(3)
iykyk π«Ά go read those next, they're all in the same friend group.
π§ HISTORY π§
the OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc. in 2004. π
it was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. iconic behavior honestly. π
π AUTHORS π
this software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. additional authors include Wayne Salamon, Robert Watson, and SPARTA Inc. π«Ά
the Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems. π
this manual page was written by Robert Watson <rwatson@FreeBSD.org>. π
and that's the whole page, bestie!! π this one's from Debian, dated April 19, 2005 β yeah it's vintage, it's serving archival realness, and it's still the GETAUID(2) you know and love. slay, stay privileged, and don't forget to check errno. π
β¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2005 Robert N. M. Watson
- Copyright (c) 2008 Apple Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms