audit_scf.h revision f89940742f5d14dde79b69b98a414dd7b7f585c7
/*
* 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
*/
/*
*/
#ifndef _AUDIT_SCF_H
#define _AUDIT_SCF_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* auditd smf(5)/libscf(3LIB) interface - set and display audit parameters
*/
#include <audit_plugin.h>
#include <ctype.h>
#include <libintl.h>
#include <libscf_priv.h>
#include <stdlib.h>
#include <strings.h>
#include <ucontext.h>
#include <zone.h>
/* gettext() obfuscation routine for lint */
#ifdef __lint
#define gettext(x) x
#endif
#ifndef DEBUG
#define DEBUG 0
#endif
#if DEBUG
#else /* ! DEBUG */
#define DPRINT(x)
#endif
/* Audit subsystem service instances */
#define AUDITD_FMRI "svc:/system/auditd:default"
#define AUDITSET_FMRI "svc:/system/auditset:default"
/* (ASI) Audit service instance SCF handles - libscf(3LIB) */
struct asi_scfhandle {
};
typedef struct asi_scfhandle asi_scfhandle_t;
struct asi_scfhandle_iter {
};
typedef struct asi_scfhandle_iter asi_scfhandle_iter_t;
/*
* configuration parameters.
*/
#define ASI_PGROUP_POLICY "policy"
struct policy_sw {
char *policy;
};
typedef struct policy_sw policy_sw_t;
#define ASI_PGROUP_QUEUECTRL "queuectrl"
#define QUEUECTRL_QBUFSZ "qbufsz"
#define QUEUECTRL_QDELAY "qdelay"
#define QUEUECTRL_QHIWATER "qhiwater"
#define QUEUECTRL_QLOWATER "qlowater"
struct scf_qctrl {
};
typedef struct scf_qctrl scf_qctrl_t;
#define ASI_PGROUP_PRESELECTION "preselection"
#define PRESELECTION_FLAGS "flags"
#define PRESELECTION_NAFLAGS "naflags"
/* auditd(1M) plugin related well known properties */
struct scf_plugin_kva_node {
struct scf_plugin_kva_node *next;
struct scf_plugin_kva_node *prev;
char plugin_name[PLUGIN_MAXBUF];
};
typedef struct scf_plugin_kva_node scf_plugin_kva_node_t;
/* Boundary checking macros for the queuectrl parameters. */
#define AQ_MINLOW 1
#define CHK_BDRY_QDELAY(x) !((x) == 0 || (x) > AQ_MAXDELAY)
(high) < AQ_LOWATER || \
(high) > AQ_MAXHIGH)
/*
* MAX_PROPVECS maximum number of audit properties that will
* fit in the uint32_t audit policy mask.
*/
#define MAX_PROPVECS 32
boolean_t do_getflags_scf(char **);
boolean_t do_getnaflags_scf(char **);
boolean_t do_setflags_scf(char *);
boolean_t do_setnaflags_scf(char *);
void free_static_att_kva(kva_t *);
uint32_t get_policy(char *);
boolean_t plugin_avail_scf(const char *);
void plugin_kva_ll_free(scf_plugin_kva_node_t *);
void prt_error_va(char *, va_list);
#ifdef __cplusplus
}
#endif
#endif /* _AUDIT_SCF_H */