Lines Matching defs:ar
317 audit_worker_process_record(struct kaudit_record *ar)
331 if (((ar->k_ar_commit & AR_COMMIT_USER) &&
332 (ar->k_ar_commit & AR_PRESELECT_USER_TRAIL)) ||
333 (ar->k_ar_commit & AR_PRESELECT_TRAIL)) {
343 if ((ar->k_ar_commit & AR_COMMIT_USER) &&
344 (ar->k_ar_commit & AR_PRESELECT_USER_TRAIL)) {
346 audit_record_write(audit_vp, &audit_ctx, ar->k_udata,
347 ar->k_ulen);
350 if ((ar->k_ar_commit & AR_COMMIT_USER) &&
351 (ar->k_ar_commit & AR_PRESELECT_USER_PIPE))
352 audit_pipe_submit_user(ar->k_udata, ar->k_ulen);
354 if (!(ar->k_ar_commit & AR_COMMIT_KERNEL) ||
355 ((ar->k_ar_commit & AR_PRESELECT_PIPE) == 0 &&
356 (ar->k_ar_commit & AR_PRESELECT_TRAIL) == 0 &&
357 (ar->k_ar_commit & AR_PRESELECT_FILTER) == 0))
360 auid = ar->k_ar.ar_subj_auid;
361 event = ar->k_ar.ar_event;
363 if (ar->k_ar.ar_errno == 0)
368 error = kaudit_to_bsm(ar, &bsm);
384 if (ar->k_ar_commit & AR_PRESELECT_TRAIL) {
389 if (ar->k_ar_commit & AR_PRESELECT_PIPE)
391 ar->k_ar_commit & AR_PRESELECT_TRAIL, bsm->data,
394 if (ar->k_ar_commit & AR_PRESELECT_FILTER) {
400 audit_sdev_submit(auid, ar->k_ar.ar_subj_asid, bsm->data,
423 struct kaudit_record *ar;
449 while ((ar = TAILQ_FIRST(&audit_q))) {
450 TAILQ_REMOVE(&audit_q, ar, k_q);
454 TAILQ_INSERT_TAIL(&ar_worklist, ar, k_q);
460 while ((ar = TAILQ_FIRST(&ar_worklist))) {
461 TAILQ_REMOVE(&ar_worklist, ar, k_q);
462 if (ar->k_ar_commit & AR_DRAIN_QUEUE) {
466 audit_worker_process_record(ar);
467 audit_free(ar);