SETAUID(2)
π SETAUID(2) π
okay so bestie, welcome to setauid β it's a system call, it lives in section 2 of the manual, and it's here to let you β¨set the audit session IDβ¨. yeah. we're doing audit stuff today. put your seatbelt on π
πΈ NAME πΈ
setauid β set audit session ID. that's it. that's the whole vibe. short, sweet, iconic π
β¨ SYNOPSIS β¨
#include <bsm/audit.h>
int
setauid(au_id_t *auid);
look at her. so clean. so simple. no cap π
π¦ DESCRIPTION π¦
so like, 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. that's the whole job. she's a one-task queen π
fr fr though β this system call requires an appropriate privilege to complete. so like, you can't just waltz in there without the right permissions. main character energy only, bestie π
π RETURN VALUES π
- if everything goes slay: the value
0is returned β¨ - if it does NOT go slay: the value
-1is returned, and the global variableerrnogets set to tell you what went wrong π
π₯ ERRORS π₯
the setauid() function will fail if:
[EFAULT]β a failure occurred while data transferred to the kernel failed. yeah, the transfer just... didn't transfer. embarrassing for everyone involved π[EPERM]β the process does not have sufficient permission to complete the operation. no permission, no service. that's the rule π«
π SEE ALSO π
the whole audit friend group π«Ά they all hang out together, iykyk
π HISTORY π
the OpenBSM implementation was created by McAfee Research β that's the security division of McAfee Inc., not a vibe, an actual company β under contract to Apple Computer Inc. in 2004. and then, plot twist, it was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. glow up fr fr β¨
π 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 the audit event stream format were defined by Sun Microsystems. legends, honestly π
and this manual page was written by Robert Watson <rwatson@FreeBSD.org>. thank you for your service, king π«‘π
and that's the whole page, bestie!! this Debian version dropped on April 19, 2005, and it's giving vintage but make it secure πβ¨ go forth and set those audit session IDs responsibly. mwah π
π¦ 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