AU_CONTROL(3)
π AU_CONTROL(3) π
Hiii bestie! Welcome to AU_CONTROL(3) from the Library Functions Manual β this is the libbsm page all about looking things up in the audit_control(5) database. No cap, it's giving βwho has the receiptsβ energy, and we're going through every function, every flag, and every tiny caveat. Periodt. π
πΈ NAME πΈ
setac, endac, getacdir, getacmin, getacexpire, getacfilesz, getacflg, getacna, getacpol, au_poltostr, au_strtopol β look up information from the audit_control database.
π LIBRARY π
Basic Security Module Library (libbsm, -lbsm).
β¨ SYNOPSIS β¨
#include <bsm/libbsm.h>
void
setac(void);
void
endac(void);
int
getacdir(char *name, int len);
int
getacmin(int *min_val);
int
getacexpire(int *andflg, time_t *age, size_t *size);
int
getacfilesz(size_t *size_val);
int
getacflg(char *auditstr, int len);
int
getacna(char *auditstr, int len);
int
getacpol(char *auditstr, size_t len);
ssize_t
au_poltostr(int policy, size_t maxsize, char *buf);
int
au_strtopol(const char *polstr, int *policy);
π DESCRIPTION π
Bestie, these interfaces are how you look up info from the audit_control(5) database. That's the database holding all the audit-related administrative parameters. Think of it as the group chat where the audit settings live. π¬
setac()β resets the database iterator to the beginning of the database. Psst: check the βBUGSβ section for more information, because this one has lore. πendac()β closes theaudit_control(5)database.getacdir()β returns the name of the directory where log data is stored via the passed character buffernameof lengthlen.getacmin()β returns the minimum free disk space for the audit log target file system via the passedmin_valvariable.getacexpire()β returns the audit trail file expiration parameters in the passedintbufferandflg,time_tbufferage, andsize_tbuffersize. If the parameter isn't specified in theaudit_control(5)file, it's set to zero.getacfilesz()β returns the audit trail rotation size in the passedsize_tbuffersize_val.getacflg()β returns the audit system flags via the passed character bufferauditstrof lengthlen.getacna()β returns the non-attributable flags via the passed character bufferauditstrof lengthlen.getacpol()β returns the audit policy flags via the passed character bufferauditstrof lengthlen.au_poltostr()β converts a numeric audit policy mask,policy, to a string in the passed character bufferbufof lengthmaxsize.au_strtopol()β converts an audit policy flags string,polstr, to a numeric audit policy mask returned viapolicy.
π RETURN VALULES π
(Yes, the original section title says VALULES β we're keeping her exactly as she is, and she's iconic. π«Ά)
getacdir(),getacmin(),getacexpire(),getacflg(),getacna(),getacpol(), andau_strtopol()β return0on success, or a negative value on failure, along with error information inerrno.au_poltostr()β returns a string length of0or more on success, or a negative value on if there is a failure.- Functions that return a string value will return a failure if there is insufficient room in the passed character buffer for the full string.
π SEE ALSO π
π¦ 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.
π AUTHORS π
This software was created by Robert Watson, Wayne Salamon, and Suresh Krishnaswamy for McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer, Inc.
The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems.
π BUGS π
These routines cannot currently distinguish between an entry not being found and an error accessing the database. The implementation should be changed to return an error via errno when NULL is returned.
π BUGS π
There is no reason for the setac() interface to be exposed as part of the public API, as it is called implicitly by other access functions and iteration is not supported.
These interfaces inconsistently return various negative values depending on the failure mode, and do not always set errno on failure.
xoxo, Debian β April 19, 2005 πβ¨
π¦ where this page comes from
- nixos 26.05: openbsm 1.1
- nixpkgs unstable: openbsm 1.1
- Copyright (c) 2005-2006 Robert N. M. Watson
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms