GETAUID(2)
π GETAUID(2) β like, the audit session ID getter, bestie π
okay so this is from the System Calls Manual, section 2, and it's literally called getauid π β yes that's the whole name, we're keeping it.
β¨ NAME β¨
getauid β retrieve audit session ID π΅οΈβοΈπ
πΈ SYNOPSIS πΈ
#include <bsm/audit.h>
int
getauid(au_id_t *auid);
like, that's it. that's the whole vibe. π¦
π DESCRIPTION π
okay so getauid() is a system call, right, and what it does is it retrieves the active audit session ID for the current process β and it hands it back to you through the au_id_t that auid points at. main character energy fr fr π
and likeβ¦ here's the thing bestie: this system call requires an appropriate privilege to complete. so if you don't have the right permissions, it's not gonna happen. no cap. π
π«Ά RETURN VALUES π«Ά
the way that this works is:
- if everything goes slay, the value
0is returned β¨ - and if it doesn't?? the value
-1is returned, and the global variableerrnogets set to indicate the error π
periodt.
π₯ ERRORS π₯
the getauid() function will fail if:
[EFAULT]β a failure occurred while data transferred from the kernel failed π like the transfer just did not go through[EPERM]β the process does not have sufficient permission to complete the operation π ββοΈ nope, not allowed, no entry
π SEE ALSO π
audit(2), auditon(2), getaudit(2), getaudit_addr(2), setaudit(2), setaudit_addr(2), setauid(2), libbsm(3)
go read those too, they're all in the same friend group π
π HISTORY π
so, storytime π§ The OpenBSM implementation was created by McAfee Research β that's the security division of McAfee Inc. β under contract to Apple Computer Inc. in 2004. and then it was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. iconic 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> π
okay that's the whole page bestie, ily, go get that audit session ID π β¨
Debian πΈ April 19, 2005 π β that's the source and the date, mwah, bye!! ππ¦
π¦ where this page comes from
- nixos 26.05: openbsm 1.1
- nixpkgs unstable: openbsm 1.1
- Copyright (c) 2005 Robert N. M. Watson
- Copyright (c) 2008 Apple Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms