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

Function audit_pipe_preselect_delete

freebsd/security/audit/audit_pipe.c:339–356  ·  view source on GitHub ↗

* Delete a per-auid mask on an audit pipe. */

Source from the content-addressed store, hash-verified

337 * Delete a per-auid mask on an audit pipe.
338 */
339static int
340audit_pipe_preselect_delete(struct audit_pipe *ap, au_id_t auid)
341{
342 struct audit_pipe_preselect *app;
343 int error;
344
345 AUDIT_PIPE_LOCK(ap);
346 app = audit_pipe_preselect_find(ap, auid);
347 if (app != NULL) {
348 TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list);
349 error = 0;
350 } else
351 error = ENOENT;
352 AUDIT_PIPE_UNLOCK(ap);
353 if (app != NULL)
354 free(app, M_AUDIT_PIPE_PRESELECT);
355 return (error);
356}
357
358/*
359 * Delete all per-auid masks on an audit pipe.

Callers 1

audit_pipe_ioctlFunction · 0.85

Calls 2

freeFunction · 0.50

Tested by

no test coverage detected