Lines Matching refs:rd
59 #define AW_DEFAULTRD_FLAG ((uint_t)0x0000080) /* Use default rd */
164 int save_rd; /* associated save rd */
333 static int cur_rd = AW_NO_RD; /* the current rd */
344 static int aw_chk_event_id(int rd);
347 static int aw_chk_rd(int rd);
352 static int aw_do_subject(int rd);
358 static int aw_head(int rd);
360 static int aw_preselect(int rd, au_mask_t *pmaskp);
363 static int aw_queue_write(int rd);
368 static void aw_rec_dealloc(int rd);
370 static int aw_return_attrib(int rd);
372 static void aw_set_event(int rd, au_event_t event_id, uint_t class);
376 static int aw_audit_write(int rd);
377 static int aw_auditctl_write(int rd);
424 int get_rd; /* rd to pass back */
540 * special case - reallocate the default rd
549 * if user blows away the current rd, set it back
792 aw_chk_event_id(int rd)
794 if (aw_recs[rd]->event_id == (au_event_t)NULL)
850 aw_chk_rd(int rd)
852 if ((rd > aw_num_recs) || (aw_recs[rd] == (aw_rec_t *)0))
979 aw_do_subject(int rd)
990 if (AW_REC_SUBJECT_FLAG & aw_recs[rd]->aflags)
1006 if (aw_buf_append(&(aw_recs[rd]->buf), &(aw_recs[rd]->len),
1021 if (aw_buf_append(&(aw_recs[rd]->buf), &(aw_recs[rd]->len),
1034 if (aw_buf_append(&(aw_recs[rd]->buf), &(aw_recs[rd]->len),
1132 * descriptor is gone we must clean up its save rd if any.
1854 aw_head(int rd)
1862 if ((tokp = au_to_header_ex(aw_recs[rd]->event_id,
1863 aw_recs[rd]->event_mod)) == (token_t *)NULL)
1869 len = aw_recs[rd]->len + tokp->tt_size;
1874 if (aw_buf_prepend(&(aw_recs[rd]->buf), &(aw_recs[rd]->len),
1992 * A specified rd of -1 here means that the
1993 * default rd should be discarded.
2130 aw_preselect(int rd, au_mask_t *pmaskp)
2132 if (aw_recs[rd]->event_mod & PAD_FAILURE)
2133 return (aw_recs[rd]->class & pmaskp->am_failure);
2135 return (aw_recs[rd]->class & pmaskp->am_success);
2181 aw_queue_write(int rd)
2183 if (aw_queue_bytes + aw_recs[rd]->len > AW_MAX_REC_SIZE) {
2187 if ((auditctl(A_AUDIT, (uint32_t)aw_recs[rd]->len,
2188 aw_recs[rd]->buf)) == -1)
2197 aw_recs[rd]->buf, aw_recs[rd]->len) == AW_ERR_RTN)
2335 aw_rec_dealloc(int rd)
2339 if (aw_recs[rd] == (aw_rec_t *)0)
2342 aw_free(aw_recs[rd]->buf);
2343 aw_recs[rd]->buf = (caddr_t)0;
2347 aw_free((caddr_t)aw_recs[rd]);
2348 aw_recs[rd] = (aw_rec_t *)0;
2380 aw_return_attrib(int rd)
2389 if (aw_buf_append(&(aw_recs[rd]->buf), &(aw_recs[rd]->len),
2418 aw_set_event(int rd, au_event_t event_id, uint_t class)
2420 aw_recs[rd]->event_id = event_id;
2421 aw_recs[rd]->class = class;
2510 * given rd.
2554 * Save context for our rd first... If our rd is gone
2585 aw_audit_write(int rd)
2587 if (audit(aw_recs[rd]->buf, aw_recs[rd]->len) == -1)
2599 aw_auditctl_write(int rd)
2601 if (auditctl(A_AUDIT, (uint32_t)aw_recs[rd]->len,
2602 aw_recs[rd]->buf) == -1)
2692 aw_geterrno(const int rd)
2698 if (aw_chk_rd(rd) == AW_ERR_RTN) {
2703 err = aw_recs[rd]->context.aw_errno;
2744 aw_perror_r(const int rd, const char *s)
2748 err = aw_geterrno(rd);