Replace use of AU_NULL with 0 when no audit classes are in use; this

supports the removal of hard-coded audit class constants in OpenBSM
1.0.  All audit classes are now dynamically configured via the
audit_class database.

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2007-10-29 18:07:48 +00:00
parent f03368334e
commit 323f4cc31d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173142
2 changed files with 4 additions and 4 deletions

View File

@ -229,8 +229,8 @@ audit_init(void)
audit_fstat.af_filesz = 0; /* '0' means unset, unbounded. */
audit_fstat.af_currsz = 0;
audit_nae_mask.am_success = AU_NULL;
audit_nae_mask.am_failure = AU_NULL;
audit_nae_mask.am_success = 0;
audit_nae_mask.am_failure = 0;
TAILQ_INIT(&audit_q);
audit_q_len = 0;

View File

@ -78,7 +78,7 @@ au_event_class(au_event_t event)
mtx_lock(&evclass_mtx);
evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE];
class = AU_NULL;
class = 0;
LIST_FOREACH(evc, &evcl->head, entry) {
if (evc->event == event) {
class = evc->class;
@ -145,7 +145,7 @@ au_evclassmap_init(void)
*/
for (i = 0; i < SYS_MAXSYSCALL; i++) {
if (sysent[i].sy_auevent != AUE_NULL)
au_evclassmap_insert(sysent[i].sy_auevent, AU_NULL);
au_evclassmap_insert(sysent[i].sy_auevent, 0);
}
}