GETFAUDITFLAGS(3)

NAME
getfauditflags - generates the process audit state

SYNOPSIS
#include <sys/types.h>
#include <sys/audit.h>
#include <sys/label.h>

void getfauditflags(usremasks, usrdmasks, lastmasks)
audit_state_t *usremasks;
audit_state_t *usrdmasks;
audit_state_t *lastmasks;

DESCRIPTION

getfauditflags generates the process audit state from the user audit value as input to getfauditflags and the system audit value as specified in the audit_control file. getfauditflags obtains the system audit value by calling getacflg. The user audit value, pointed to by usremasks and usrdmasks is passed into getfauditflags.

usremasks points to audit_state_t fields which contains two values. The first value defines which events are always to be audited when they succeed. The second value defines which events are always to be audited when they fail.

usrdmasks also points to audit_state_t fields which contains two values. The first value defines which events are never to be audited when they succeed. The second value defines which events are never to be audited when they fail.

The structures pointed to by usremasks and usrdmasks may be obtained from the passwd.adjunct file by calling getpwaent() which returns a pointer to a strucure containing all passwd.adjunct fields for a user.

lastmasks points to audit_state_t as well. The first value defines which events are to be audited when they succeed and the second value defines which events are to be audited when they fail.

Both usremasks and usrdmasks override the values in the system audit values.

DIAGNOSTICS
-1 is returned on error and 0 on success.

SEE ALSO
getauditflags(3), getacinfo(3), audit.log(5), audit_control(5)