|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Extended Library Functions, Volume 1 Oracle Solaris 11 Express 11/10|
- get user's binary preselection mask
cc [ flag... ] file... -lbsm -lsocket -lnsl [ library... ] #include <bsm/libbsm.h> int au_user_mask(char *username, au_mask_t *mask_p);
The au_user_mask() function reads the default (per-zone-specific) audit mask from kernel, combines it with the per-user audit flags from the user_attr(4) database, and updates the binary preselection mask pointed to by mask_p with the combined value.
The always-audit-flags and never-audit-flags fields from the user_attr database represent binary audit classes. These fields are combined by au_preselect(3BSM) as follows:
mask = ( user default preselection mask + always-audit-flags) - never-audit-flags
The au_user_mask() function fails only if the user default audit mask could not be retrieved. In case that user_attr database entries could not be retrieved, the function returns with success. This allows for flexible configurations.
Upon successful completion, au_user_mask() returns 0. It fails and returns -1 if the user default audit mask could not be retrieved.
extended user attributes database
See attributes(5) for descriptions of the following attributes:
The au_user_mask() function should be called by programs like login(1) which set a process's preselection mask with setaudit(2). getaudit(2) should be used to obtain audit characteristics for the current process.