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

Function audit_pipe_submit

freebsd/security/audit/audit_pipe.c:506–530  ·  view source on GitHub ↗

* audit_pipe_submit(): audit_worker submits audit records via this * interface, which arranges for them to be delivered to pipe queues. */

Source from the content-addressed store, hash-verified

504 * interface, which arranges for them to be delivered to pipe queues.
505 */
506void
507audit_pipe_submit(au_id_t auid, au_event_t event, au_class_t class, int sorf,
508 int trail_select, void *record, u_int record_len)
509{
510 struct audit_pipe *ap;
511
512 /*
513 * Lockless read to avoid lock overhead if pipes are not in use.
514 */
515 if (TAILQ_FIRST(&audit_pipe_list) == NULL)
516 return;
517
518 AUDIT_PIPE_LIST_RLOCK();
519 TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) {
520 AUDIT_PIPE_LOCK(ap);
521 if (audit_pipe_preselect_check(ap, auid, event, class, sorf,
522 trail_select))
523 audit_pipe_append(ap, record, record_len);
524 AUDIT_PIPE_UNLOCK(ap);
525 }
526 AUDIT_PIPE_LIST_RUNLOCK();
527
528 /* Unlocked increment. */
529 audit_pipe_records++;
530}
531
532/*
533 * audit_pipe_submit_user(): the same as audit_pipe_submit(), except that

Callers 1

Calls 2

audit_pipe_appendFunction · 0.85

Tested by

no test coverage detected