FreeBSD/sys/security/audit/audit_bsm_klib.c
/*
 * Check whether an event is aditable by comparing the mask of classes this
 * event is part of against the given mask.
 */
Check whether an event is aditable by comparing the mask of classes this
event is part of against the given mask.
Check whether an event is aditable by comparing the mask of classes this event is part of against the given mask .
int
au_preselect(au_event_t event, au_class_t class, au_mask_t *mask_p, int sorf)
{
	au_class_t effmask = 0;
	if (mask_p == NULL)
		return (-1);
	if (sorf & AU_PRS_SUCCESS)
		effmask |= (mask_p->am_success & class);
	if (sorf & AU_PRS_FAILURE)
		effmask |= (mask_p->am_failure & class);
	if (effmask)
		return (1);
	else
		return (0);
}
int au_preselect ( au_event_t event , au_class_t class , au_mask_t * mask_p , int sorf ) { au_class_t effmask = 0 ; if ( mask_p == NULL ) return ( -1 ) ; if ( sorf & AU_PRS_SUCCESS ) effmask |= ( mask_p -> am_success & class ) ; if ( sorf & AU_PRS_FAILURE ) effmask |= ( mask_p -> am_failure & class ) ; if ( effmask ) return ( 1 ) ; else return ( 0 ) ; }
Check whether an event is aditable by comparing the mask of classes this
 event is part of against the given mask.
Check whether an event is aditable by comparing the mask of classes this event is part of against the given mask .
/*
	 * Perform the actual check of the masks against the event.
	 */