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