2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _AUDIT_POLICY_H
2N/A#define _AUDIT_POLICY_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <bsm/audit.h>
2N/A#include <bsm/libbsm.h>
2N/A
2N/A#define ALL_POLICIES (AUDIT_AHLT|\
2N/A AUDIT_ARGE|\
2N/A AUDIT_ARGV|\
2N/A AUDIT_CNT|\
2N/A AUDIT_GROUP|\
2N/A AUDIT_SEQ|\
2N/A AUDIT_TRAIL|\
2N/A AUDIT_PATH|\
2N/A AUDIT_PUBLIC|\
2N/A AUDIT_ZONENAME|\
2N/A AUDIT_PERZONE|\
2N/A AUDIT_WINDATA_DOWN|\
2N/A AUDIT_WINDATA_UP)
2N/A
2N/A#define NO_POLICIES (0)
2N/A
2N/Astruct policy_entry {
2N/A char *policy_str;
2N/A uint32_t policy_mask;
2N/A char *policy_desc;
2N/A};
2N/Atypedef struct policy_entry policy_entry_t;
2N/A
2N/Astatic policy_entry_t policy_table[] = {
2N/A {"ahlt", AUDIT_AHLT, "halt machine if it can not record an "
2N/A "async event"},
2N/A {"all", ALL_POLICIES, "all policies"},
2N/A {"arge", AUDIT_ARGE, "include exec environment args in audit recs"},
2N/A {"argv", AUDIT_ARGV, "include exec command line args in audit recs"},
2N/A {"cnt", AUDIT_CNT, "when no more space, drop recs and keep a cnt"},
2N/A {"group", AUDIT_GROUP, "include supplementary groups in audit recs"},
2N/A {"none", NO_POLICIES, "no policies"},
2N/A {"path", AUDIT_PATH, "allow multiple paths per event"},
2N/A {"perzone", AUDIT_PERZONE, "use a separate queue and auditd per "
2N/A "zone"},
2N/A {"public", AUDIT_PUBLIC, "audit public files"},
2N/A {"seq", AUDIT_SEQ, "include a sequence number in audit recs"},
2N/A {"trail", AUDIT_TRAIL, "include trailer token in audit recs"},
2N/A {"windata_down", AUDIT_WINDATA_DOWN, "include downgraded window "
2N/A "information in audit recs"},
2N/A {"windata_up", AUDIT_WINDATA_UP, "include upgraded window "
2N/A "information in audit recs"},
2N/A {"zonename", AUDIT_ZONENAME, "include zonename token in audit recs"}
2N/A};
2N/A
2N/A#define POLICY_TBL_SZ (sizeof (policy_table) / sizeof (policy_entry_t))
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _AUDIT_POLICY_H */