- /*
- * Export the subject credential.
- */
- cru2x(cred, &ar->k_ar.ar_subj_cred);
- ar->k_ar.ar_subj_ruid = cred->cr_ruid;
- ar->k_ar.ar_subj_rgid = cred->cr_rgid;
- ar->k_ar.ar_subj_egid = cred->cr_groups[0];
- ar->k_ar.ar_subj_pid = p->p_pid;
- ar->k_ar.ar_subj_auid = cred->cr_audit.as_aia_p->ai_auid;
- ar->k_ar.ar_subj_asid = cred->cr_audit.as_aia_p->ai_asid;
- bcopy(&cred->cr_audit.as_mask, &ar->k_ar.ar_subj_amask,
- sizeof(struct au_mask));
- bcopy(&cred->cr_audit.as_aia_p->ai_termid, &ar->k_ar.ar_subj_term_addr,
- sizeof(struct au_tid_addr));
- kauth_cred_unref(&cred);
+ /*
+ * Export the subject credential.
+ */
+ cru2x(cred, &ar->k_ar.ar_subj_cred);
+ ar->k_ar.ar_subj_ruid = kauth_cred_getruid(cred);
+ ar->k_ar.ar_subj_rgid = kauth_cred_getrgid(cred);
+ ar->k_ar.ar_subj_egid = kauth_cred_getgid(cred);
+ ar->k_ar.ar_subj_pid = p->p_pid;
+ ar->k_ar.ar_subj_auid = cred->cr_audit.as_aia_p->ai_auid;
+ ar->k_ar.ar_subj_asid = cred->cr_audit.as_aia_p->ai_asid;
+ bcopy(&cred->cr_audit.as_mask, &ar->k_ar.ar_subj_amask,
+ sizeof(struct au_mask));
+ bcopy(&cred->cr_audit.as_aia_p->ai_termid,
+ &ar->k_ar.ar_subj_term_addr, sizeof(struct au_tid_addr));
+ kauth_cred_unref(&cred);
+ }