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

Function audit_send_trigger

freebsd/security/audit/audit_trigger.c:133–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133int
134audit_send_trigger(unsigned int trigger)
135{
136 struct trigger_info *ti;
137
138 ti = malloc(sizeof *ti, M_AUDITTRIGGER, M_WAITOK);
139 mtx_lock(&audit_trigger_mtx);
140 if (!audit_isopen) {
141 /* If nobody's listening, we ain't talking. */
142 mtx_unlock(&audit_trigger_mtx);
143 free(ti, M_AUDITTRIGGER);
144 return (ENODEV);
145 }
146 ti->trigger = trigger;
147 TAILQ_INSERT_TAIL(&trigger_list, ti, list);
148 wakeup(&trigger_list);
149 mtx_unlock(&audit_trigger_mtx);
150 return (0);
151}
152
153static struct cdevsw audit_cdevsw = {
154 .d_version = D_VERSION,

Callers 2

sys_auditonFunction · 0.85
audit_record_writeFunction · 0.85

Calls 5

mallocFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50
freeFunction · 0.50
wakeupFunction · 0.50

Tested by

no test coverage detected