FreeBSD/contrib/openbsm/bin/auditd/auditd.c
/*
 * Configure the audit controls in the kernel: the event to class mapping,
 * kernel preselection mask, etc.
 */
Configure the audit controls in the kernel: the event to class mapping,
kernel preselection mask, etc.
Configure the audit controls in the kernel : the event to class mapping kernel preselection mask etc .
int
auditd_config_controls(void)
{
	int cnt, err;
	int ret = 0;
	cnt = auditd_set_evcmap();
	if (cnt < 0) {
		auditd_log_err("auditd_set_evcmap() failed: %m");
		ret = -1;
	} else if (cnt == 0) {
		auditd_log_err("No events to class mappings registered.");
		ret = -1;
	} else
		auditd_log_debug("Registered %d event to class mappings.", cnt);
	err = auditd_set_namask();
	if (err) {
		auditd_log_err("auditd_set_namask() %s: %m",
		    auditd_strerror(err));
		ret = -1;
	} else
		auditd_log_debug("Registered non-attributable event mask.");
	err = auditd_set_policy();
	if (err) {
		auditd_log_err("auditd_set_policy() %s: %m",
		    auditd_strerror(err));
		ret = -1;
	} else
		auditd_log_debug("Set audit policy in kernel.");
	err = auditd_set_fsize();
	if (err) {
		auditd_log_err("audit_set_fsize() %s: %m",
		    auditd_strerror(err));
		ret = -1;
	} else
		auditd_log_debug("Set audit trail size in kernel.");
	err = auditd_set_minfree();
	if (err) {
		auditd_log_err("auditd_set_minfree() %s: %m",
		    auditd_strerror(err));
		ret = -1;
	} else
		auditd_log_debug(
		    "Set audit trail min free percent in kernel.");
	err = auditd_set_host();
	if (err) {
		if (err == ADE_PARSE) {
			auditd_log_notice(
			    "audit_control(5) may be missing 'host:' field");
		} else {
			auditd_log_err("auditd_set_host() %s: %m",
			    auditd_strerror(err));
			ret = -1;
		}
	} else
		auditd_log_debug(
		    "Set audit host address information in kernel.");
	return (ret);
}
int auditd_config_controls ( void ) { int cnt , err ; int ret = 0 ; cnt = auditd_set_evcmap ( ) ; if ( cnt < 0 ) { auditd_log_err ( " " ) ; ret = -1 ; } else if ( cnt == 0 ) { auditd_log_err ( " " ) ; ret = -1 ; } else auditd_log_debug ( " " , cnt ) ; err = auditd_set_namask ( ) ; if ( err ) { auditd_log_err ( " " , auditd_strerror ( err ) ) ; ret = -1 ; } else auditd_log_debug ( " " ) ; err = auditd_set_policy ( ) ; if ( err ) { auditd_log_err ( " " , auditd_strerror ( err ) ) ; ret = -1 ; } else auditd_log_debug ( " " ) ; err = auditd_set_fsize ( ) ; if ( err ) { auditd_log_err ( " " , auditd_strerror ( err ) ) ; ret = -1 ; } else auditd_log_debug ( " " ) ; err = auditd_set_minfree ( ) ; if ( err ) { auditd_log_err ( " " , auditd_strerror ( err ) ) ; ret = -1 ; } else auditd_log_debug ( " " ) ; err = auditd_set_host ( ) ; if ( err ) { if ( err == ADE_PARSE ) { auditd_log_notice ( " " ) ; } else { auditd_log_err ( " " , auditd_strerror ( err ) ) ; ret = -1 ; } } else auditd_log_debug ( " " ) ; return ( ret ) ; }
Configure the audit controls in the kernel: the event to class mapping,
 kernel preselection mask, etc.
Configure the audit controls in the kernel : the event to class mapping kernel preselection mask etc .
/*
	 * Configure event to class mappings in kernel.
	 */ /*
	 * Configure non-attributable event mask in kernel.
	 */ /*
	 * Configure audit policy in kernel.
	 */ /*
	 * Configure audit trail log size in kernel.
	 */ /*
	 * Configure audit trail volume minimum free percentage of blocks in
	 * kernel.
	 */ /*
	 * Configure host address in the audit kernel information.
	 */