xref: /illumos-gate/usr/src/man/man3bsm/getfauditflags.3bsm (revision 7855d95b30fd903e3918bad5a29b777e765db821)
te
Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
GETFAUDITFLAGS 3BSM "Mar 6, 2017"
NAME
getfauditflags - generate process audit state
SYNOPSIS

cc [ flag... ] file... -lbsm  -lsocket   -lnsl  [ library... ]
#include <sys/param.h>
#include <bsm/libbsm.h>

int getfauditflags(au_mask_t *usremasks, au_mask_t *usrdmasks,
 au_mask_t *lastmasks);
DESCRIPTION

The getfauditflags() function generates a process audit state by combining the audit masks passed as parameters with the system audit masks.

The usremasks argument points to au_mask_t fields that 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.

The usrdmasks argument points to au_mask_t fields that 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 output of this function is stored in lastmasks, a pointer of type au_mask_t as well. The first value defines which events are to be audited when they succeed and the second defines which events are to be audited when they fail.

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

RETURN VALUES

Upon successful completion, getfauditflags() returns 0. Otherwise it returns -1.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe
SEE ALSO

getauditflags(3BSM), audit.log(4), attributes(5)