NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO | NOTES
cc [ flag ... ] file ... -lbsm -lsocket -lnsl -lintl [ library ... ] #include <sys/param.h> #include <bsm/audit.h>int getaudit(struct auditinfo * info);
The getaudit() function gets the audit ID, the preselection mask, the terminal ID and the audit session ID for the current process.
The setaudit() function sets the audit ID, the preselection mask, the terminal ID and the audit session ID for the current process.
The info structure used to pass the process audit information contains the following members:
au_id_t ai_auid; /* audit user ID */ au_mask_t ai_mask; /* preselection mask */ au_tid_t ai_termid; /* terminal ID */ au_asid_t ai_asid; /* audit session ID */
Upon successful completion, getaudit() and setaudit() return 0 . Otherwise, -1 is returned and errno is set to indicate the error.
The getaudit() and setaudit() functions will fail if:
The info parameter points outside the process's allocated address space.
The process's effective user ID is not super-user.
Only processes with the effective user ID of the super-user may successfully execute these calls.
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO | NOTES