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

Function au_preselect

freebsd/security/audit/audit_bsm_klib.c:125–146  ·  view source on GitHub ↗

* Check whether an event is auditable by comparing the mask of classes this * event is part of against the given mask. */

Source from the content-addressed store, hash-verified

123 * event is part of against the given mask.
124 */
125int
126au_preselect(au_event_t event, au_class_t class, au_mask_t *mask_p, int sorf)
127{
128 au_class_t effmask = 0;
129
130 if (mask_p == NULL)
131 return (-1);
132
133 /*
134 * Perform the actual check of the masks against the event.
135 */
136 if (sorf & AU_PRS_SUCCESS)
137 effmask |= (mask_p->am_success & class);
138
139 if (sorf & AU_PRS_FAILURE)
140 effmask |= (mask_p->am_failure & class);
141
142 if (effmask)
143 return (1);
144 else
145 return (0);
146}
147
148/*
149 * Convert sysctl names and present arguments to events.

Callers 4

audit_commitFunction · 0.85
audit_syscall_enterFunction · 0.85
audit_proc_coredumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected