MCPcopy Create free account
hub / github.com/F-Stack/f-stack / au_event_class

Function au_event_class

freebsd/security/audit/audit_bsm_db.c:114–133  ·  view source on GitHub ↗

* Look up the class for an audit event in the class mapping table. */

Source from the content-addressed store, hash-verified

112 * Look up the class for an audit event in the class mapping table.
113 */
114au_class_t
115au_event_class(au_event_t event)
116{
117 struct evclass_list *evcl;
118 struct evclass_elem *evc;
119 au_class_t class;
120
121 EVCLASS_RLOCK();
122 evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE];
123 class = 0;
124 LIST_FOREACH(evc, &evcl->head, entry) {
125 if (evc->event == event) {
126 class = evc->class;
127 goto out;
128 }
129 }
130out:
131 EVCLASS_RUNLOCK();
132 return (class);
133}
134
135/*
136 * Insert a event to class mapping. If the event already exists in the

Callers 5

sys_auditonFunction · 0.85
audit_commitFunction · 0.85
audit_syscall_enterFunction · 0.85
audit_proc_coredumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected