#ifndef _AUDIT_POLICY_H
#define _AUDIT_POLICY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <bsm/audit.h>
#include <bsm/libbsm.h>
#define ALL_POLICIES (AUDIT_AHLT|\
AUDIT_ARGE|\
AUDIT_ARGV|\
AUDIT_CNT|\
AUDIT_GROUP|\
AUDIT_SEQ|\
AUDIT_TRAIL|\
AUDIT_PATH|\
AUDIT_PUBLIC|\
AUDIT_ZONENAME|\
AUDIT_PERZONE|\
AUDIT_WINDATA_DOWN|\
AUDIT_WINDATA_UP)
#define NO_POLICIES (0)
struct policy_entry {
char *policy_str;
uint32_t policy_mask;
char *policy_desc;
};
typedef struct policy_entry policy_entry_t;
static policy_entry_t policy_table[] = {
{"ahlt", AUDIT_AHLT, "halt machine if it can not record an "
"async event"},
{"all", ALL_POLICIES, "all policies"},
{"arge", AUDIT_ARGE, "include exec environment args in audit recs"},
{"argv", AUDIT_ARGV, "include exec command line args in audit recs"},
{"cnt", AUDIT_CNT, "when no more space, drop recs and keep a cnt"},
{"group", AUDIT_GROUP, "include supplementary groups in audit recs"},
{"none", NO_POLICIES, "no policies"},
{"path", AUDIT_PATH, "allow multiple paths per event"},
{"perzone", AUDIT_PERZONE, "use a separate queue and auditd per "
"zone"},
{"public", AUDIT_PUBLIC, "audit public files"},
{"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