Lines Matching defs:ar
88 audit_mac_new(proc_t p, struct kaudit_record *ar)
95 ar->k_ar.ar_cred_mac_labels = (char *)zalloc(audit_mac_label_zone);
96 if (ar->k_ar.ar_cred_mac_labels == NULL)
99 mac.m_string = ar->k_ar.ar_cred_mac_labels;
105 ar->k_ar.ar_mac_records = (struct mac_audit_record_list_t *)
106 kalloc(sizeof(*ar->k_ar.ar_mac_records));
107 if (ar->k_ar.ar_mac_records == NULL) {
108 zfree(audit_mac_label_zone, ar->k_ar.ar_cred_mac_labels);
111 LIST_INIT(ar->k_ar.ar_mac_records);
112 ar->k_ar.ar_forced_by_mac = 0;
118 audit_mac_free(struct kaudit_record *ar)
122 if (ar->k_ar.ar_vnode1_mac_labels != NULL)
123 zfree(audit_mac_label_zone, ar->k_ar.ar_vnode1_mac_labels);
124 if (ar->k_ar.ar_vnode2_mac_labels != NULL)
125 zfree(audit_mac_label_zone, ar->k_ar.ar_vnode2_mac_labels);
126 if (ar->k_ar.ar_cred_mac_labels != NULL)
127 zfree(audit_mac_label_zone, ar->k_ar.ar_cred_mac_labels);
128 if (ar->k_ar.ar_arg_mac_string != NULL)
129 kfree(ar->k_ar.ar_arg_mac_string,
135 head = LIST_FIRST(ar->k_ar.ar_mac_records);
142 kfree(ar->k_ar.ar_mac_records, sizeof(*ar->k_ar.ar_mac_records));
236 audit_arg_mac_string(struct kaudit_record *ar, char *string)
239 if (ar->k_ar.ar_arg_mac_string == NULL)
240 ar->k_ar.ar_arg_mac_string =
249 if (ar->k_ar.ar_arg_mac_string == NULL)
250 if (ar->k_ar.ar_arg_mac_string == NULL)
253 strncpy(ar->k_ar.ar_arg_mac_string, MAC_ARG_PREFIX,
255 strncpy(ar->k_ar.ar_arg_mac_string + MAC_ARG_PREFIX_LEN, string,
257 ARG_SET_VALID(ar, ARG_MAC_STRING);