FreeBSD/sys/security/audit/audit_bsm_klib.c
/*
 * Convert an open flags specifier into a specific type of open event for
 * auditing purposes.
 */
Convert an open flags specifier into a specific type of open event for
auditing purposes.
Convert an open flags specifier into a specific type of open event for auditing purposes .
au_event_t
audit_flags_and_error_to_openevent(int oflags, int error)
{
	int i;
	oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
	for (i = 0; i < nitems(aue_open); i++) {
		if (aue_open[i].aoe_flags == oflags)
			return (aue_open[i].aoe_event);
	}
	return (AUE_OPEN);
}
au_event_t audit_flags_and_error_to_openevent ( int oflags , int error ) { int i ; oflags = oflags & ( O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY ) ; for ( i = 0 ; i < nitems ( aue_open ) ; i ++ ) { if ( aue_open [ i ] . aoe_flags == oflags ) return ( aue_open [ i ] . aoe_event ) ; } return ( AUE_OPEN ) ; }
Convert an open flags specifier into a specific type of open event for
 auditing purposes.
Convert an open flags specifier into a specific type of open event for auditing purposes .
/*
	 * Need to check only those flags we care about.
	 */