/*
* CDDL HEADER START
*
* 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
* 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]
*
* CDDL HEADER END
*/
/*
*/
#include <errno.h>
#include <nss.h>
#include <secdb.h>
#include <stdlib.h>
#include <string.h>
#include <user_attr.h>
#include <zone.h>
#include <adt_xlate.h> /* adt_write_syslog */
/* ARGSUSED */
static int
{
char *val;
}
return (1);
}
return (0);
}
/*
* Build user's audit preselection mask.
*
* per-user audit flags are optional and may be missing.
* If global zone auditing is set, a local zone cannot reduce the default
* flags.
*
* success flags = (system default success flags + per-user always success) -
* per-user never success flags
* failure flags = (system default failure flags + per-user always failure) -
* per-user never failure flags
*/
int
{
return (-1);
}
/*
* Get the audit default flags. This will be the system wide
* Global zone flags, or, if the perzone policy is set, the
* zone's default flags. If this fails, return an error code
* now and don't bother trying to get the user specific flags.
*/
sizeof (global_mask)) == -1) {
return (-1);
}
/*
* Get per-user audit flags.
*/
if (user_flags == NULL) {
} else {
/* merge default and per-user */
/*
* Enforce the policy that the local zone audit_flags cannot
* reduce the global zone defaults unless the perzone audit
* policy is set.
*/
sizeof (policy)) != 0) {
return (-1);
}
if (((policy & AUDIT_PERZONE) == 0) &&
(getzoneid() != GLOBAL_ZONEID)) {
}
}
return (0);
}