xref: /illumos-gate/usr/src/man/man3bsm/getauditflags.3bsm (revision 2aeafac3612e19716bf8164f89c3c9196342979c)
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]
GETAUDITFLAGS 3BSM "Mar 6, 2017"
NAME
getauditflags, getauditflagsbin, getauditflagschar - convert audit flag specifications
SYNOPSIS

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

int getauditflagsbin(char *auditstring, au_mask_t *masks);

int getauditflagschar(char *auditstring, au_mask_t *masks, int verbose);
DESCRIPTION

The getauditflagsbin() function converts the character representation of audit values pointed to by auditstring into au_mask_t fields pointed to by masks. These fields indicate which events are to be audited when they succeed and which are to be audited when they fail.

The getauditflagschar() function converts the au_mask_t fields pointed to by masks into a string pointed to by auditstring. If verbose is 0, the short (2-character) flag names are used. If verbose is non-zero, the long flag names are used. The auditstring argument should be large enough to contain the ASCII representation of the events.

The auditstring argument contains a series of event names, each one identifying a single audit class, separated by commas. The au_mask_t fields pointed to by masks correspond to binary values defined in <bsm/audit.h>, which is read by <bsm/libbsm.h>.

RETURN VALUES

Upon successful completion, getauditflagsbin() and getauditflagschar() return 0. Otherwise they return -1.

ATTRIBUTES

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

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

audit.log(4), attributes(5)

BUGS

This is not a very extensible interface.