SETAUID(2)
π SETAUID(2) π
okay so real talk bestie, this is the <setauid> page from the System Calls Manual and it's literally all about setting your audit session ID. tiny page, big energy π«Ά
β¨ NAME β¨
setauid β set audit session ID π
πΈ SYNOPSIS πΈ
#include <bsm/audit.h>
int
setauid(au_id_t *auid);
π¦ DESCRIPTION π¦
so the setauid() system call sets the active audit session ID for the current process, and it pulls that ID from the au_id_t that auid is pointing at. like, pointer goes in, session ID comes out, no cap β¨
π heads up: this system call requires an appropriate privilege to complete. no privilege, no slay.
π RETURN VALUES π
when it works? you get the value 0 back. iconic, flawless, ate.
when it doesn't? you get the value -1, and the global variable errno is set to indicate the error. sad girl hours π
π₯ ERRORS π₯
the setauid() function will fail if:
[EFAULT]β a failure occurred while data transferred to the kernel failed π[EPERM]β the process does not have sufficient permission to complete the operation π
π SEE ALSO π
audit(2), auditon(2), getaudit(2), getaudit_addr(2), getauid(2), setaudit(2), setaudit_addr(2), libbsm(3)
β 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. little bit of lore for you π§
π 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, go forth and audit responsibly π π
Debian Β· April 19, 2005 Β· SETAUID(2) β signed, sealed, and delivered with main character energy ππ
π¦ 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