&audit_session_member_clear_sflags_mask,
"Audit session flags clearable by a session member");
+extern int set_security_token_task_internal(proc_t p, void *task);
+
#define AUDIT_SESSION_DEBUG 0
#if AUDIT_SESSION_DEBUG
/*
}
static int
-audit_session_join_internal(proc_t p, ipc_port_t port, au_asid_t *new_asid)
+audit_session_join_internal(proc_t p, task_t task, ipc_port_t port, au_asid_t *new_asid)
{
auditinfo_addr_t *new_aia_p, *old_aia_p;
kauth_cred_t my_cred = NULL;
proc_ucred_unlock(p);
/* Propagate the change from the process to the Mach task. */
- set_security_token(p);
+ set_security_token_task_internal(p, task);
/* Decrement the process count of the former session. */
audit_dec_procount(AU_SENTRY_PTR(old_aia_p));
* ESRCH Invalid calling process/cred.
*/
int
-audit_session_spawnjoin(proc_t p, ipc_port_t port)
+audit_session_spawnjoin(proc_t p, task_t task, ipc_port_t port)
{
au_asid_t new_asid;
- return (audit_session_join_internal(p, port, &new_asid));
+ return (audit_session_join_internal(p, task, port, &new_asid));
}
/*
*ret_asid = AU_DEFAUDITSID;
err = EINVAL;
} else
- err = audit_session_join_internal(p, port, ret_asid);
+ err = audit_session_join_internal(p, p->task, port, ret_asid);
return (err);
}