Lines Matching refs:door_dp

53 static int audit_save_namask(door_data_t *door_dp);
54 static int audit_save_policy(door_data_t *door_dp);
79 audit_save_policy(door_data_t *door_dp) in audit_save_policy() argument
86 door_dp->audit_policy = policy; in audit_save_policy()
95 audit_init(door_data_t *door_dp) in audit_init() argument
97 door_dp->audit_auid = (uid_t)-1; in audit_init()
98 door_dp->audit_uid = (uid_t)-1; in audit_init()
99 door_dp->audit_euid = (uid_t)-1; in audit_init()
100 door_dp->audit_gid = (gid_t)-1; in audit_init()
101 door_dp->audit_egid = (gid_t)-1; in audit_init()
102 door_dp->audit_pid = -1; in audit_init()
103 door_dp->audit_tid.at_port = 0; in audit_init()
104 door_dp->audit_tid.at_type = 0; in audit_init()
105 door_dp->audit_tid.at_addr[0] = 0; in audit_init()
106 door_dp->audit_tid.at_addr[1] = 0; in audit_init()
107 door_dp->audit_tid.at_addr[2] = 0; in audit_init()
108 door_dp->audit_tid.at_addr[3] = 0; in audit_init()
109 door_dp->audit_namask.am_success = (int)-1; in audit_init()
110 door_dp->audit_namask.am_failure = (int)-1; in audit_init()
111 door_dp->audit_event = 0; in audit_init()
112 door_dp->audit_sorf = -2; in audit_init()
113 door_dp->audit_user = NULL; in audit_init()
114 door_dp->audit_text[0] = '\0'; in audit_init()
115 door_dp->audit_text1[0] = '\0'; in audit_init()
116 door_dp->audit_na = 0; in audit_init()
117 door_dp->audit_asid = (au_asid_t)(-1); in audit_init()
118 door_dp->audit_path = NULL; in audit_init()
122 audit_save_me(door_data_t *door_dp) in audit_save_me() argument
131 door_dp->audit_ap.ap_pid = client_cred.dc_pid; in audit_save_me()
132 ret_val = auditon(A_GETPINFO_ADDR, (caddr_t)&door_dp->audit_ap, in audit_save_me()
133 sizeof (door_dp->audit_ap)); in audit_save_me()
137 door_dp->audit_auid = door_dp->audit_ap.ap_auid; in audit_save_me()
138 door_dp->audit_euid = client_cred.dc_euid; in audit_save_me()
139 door_dp->audit_egid = client_cred.dc_egid; in audit_save_me()
140 door_dp->audit_uid = client_cred.dc_ruid; in audit_save_me()
141 door_dp->audit_gid = client_cred.dc_rgid; in audit_save_me()
142 door_dp->audit_pid = client_cred.dc_pid; in audit_save_me()
143 door_dp->audit_asid = door_dp->audit_ap.ap_asid; in audit_save_me()
144 door_dp->audit_tid.at_port = door_dp->audit_ap.ap_termid.at_port; in audit_save_me()
145 door_dp->audit_tid.at_type = door_dp->audit_ap.ap_termid.at_type; in audit_save_me()
146 for (i = 0; i < (door_dp->audit_ap.ap_termid.at_type/4); i++) in audit_save_me()
147 door_dp->audit_tid.at_addr[i] = in audit_save_me()
148 door_dp->audit_ap.ap_termid.at_addr[i]; in audit_save_me()
149 (void) audit_save_policy(door_dp); in audit_save_me()
161 audit_save_namask(door_data_t *door_dp) in audit_save_namask() argument
165 door_dp->audit_na = -1; in audit_save_namask()
174 door_dp->audit_namask.am_success = mask.am_success; in audit_save_namask()
175 door_dp->audit_namask.am_failure = mask.am_failure; in audit_save_namask()
176 door_dp->audit_na = 1; in audit_save_namask()
188 audit_audit(door_data_t *door_dp) in audit_audit() argument
196 if (door_dp->audit_na) { in audit_audit()
197 if (!audit_na_selected(door_dp)) { in audit_audit()
200 } else if (!audit_selected(door_dp)) { in audit_audit()
208 (void) au_write(ad, au_to_subject_ex(door_dp->audit_auid, in audit_audit()
209 door_dp->audit_euid, in audit_audit()
210 door_dp->audit_egid, in audit_audit()
211 door_dp->audit_uid, door_dp->audit_gid, door_dp->audit_pid, in audit_audit()
212 door_dp->audit_asid, &door_dp->audit_tid)); in audit_audit()
215 if (door_dp->audit_policy & AUDIT_GROUP) { in audit_audit()
225 if (strlen(door_dp->audit_text) != 0) { in audit_audit()
226 (void) au_write(ad, au_to_text(door_dp->audit_text)); in audit_audit()
228 if (strlen(door_dp->audit_text1) != 0) { in audit_audit()
229 (void) au_write(ad, au_to_text(door_dp->audit_text1)); in audit_audit()
231 if (door_dp->audit_path != NULL) { in audit_audit()
232 (void) au_write(ad, au_to_path(door_dp->audit_path)); in audit_audit()
235 (void) au_write(ad, au_to_return64((door_dp->audit_sorf == 0) ? 0 : -1, in audit_audit()
236 (int64_t)door_dp->audit_sorf)); in audit_audit()
238 (void) au_write(ad, au_to_return32((door_dp->audit_sorf == 0) ? 0 : -1, in audit_audit()
239 (int32_t)door_dp->audit_sorf)); in audit_audit()
241 if (au_close(ad, 1, door_dp->audit_event) < 0) { in audit_audit()
250 audit_na_selected(door_data_t *door_dp) in audit_na_selected() argument
252 if (door_dp->audit_na == -1) { in audit_na_selected()
256 return (selected(door_dp->audit_event, in audit_na_selected()
257 &door_dp->audit_namask, door_dp->audit_sorf)); in audit_na_selected()
261 audit_selected(door_data_t *door_dp) in audit_selected() argument
264 if (door_dp->audit_uid > MAXUID) { in audit_selected()
265 (void) audit_save_namask(door_dp); in audit_selected()
266 return (audit_na_selected(door_dp)); in audit_selected()
269 return (selected(door_dp->audit_event, in audit_selected()
270 &door_dp->audit_ap.ap_mask, door_dp->audit_sorf)); in audit_selected()