From 62123c11d73b074206859f8a24f4e65c1d1e0061 Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 23 Jun 2010 22:55:43 +0000 Subject: [PATCH 1/1] launchd-329.3.2.tar.gz --- launchd/src/launchd_core_logic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/launchd/src/launchd_core_logic.c b/launchd/src/launchd_core_logic.c index 9d23527..5f6a5b7 100644 --- a/launchd/src/launchd_core_logic.c +++ b/launchd/src/launchd_core_logic.c @@ -16,7 +16,7 @@ * @APPLE_APACHE_LICENSE_HEADER_END@ */ -static const char *const __rcs_file_version__ = "$Revision: 24108 $"; +static const char *const __rcs_file_version__ = "$Revision: 24208 $"; #include "config.h" #include "launchd_core_logic.h" @@ -8292,6 +8292,12 @@ job_mig_init_session(job_t j, name_t session_type, mach_port_t audit_session) kern_return_t job_mig_switch_to_session(job_t j, mach_port_t requestor_port, name_t session_name, mach_port_t audit_session, mach_port_t *new_bsport) { + struct ldcred *ldc = runtime_get_caller_creds(); + if (!jobmgr_assumes(root_jobmgr, j != NULL)) { + jobmgr_log(root_jobmgr, LOG_ERR, "%s() called with NULL job: PID %d", __func__, ldc->pid); + return BOOTSTRAP_NO_MEMORY; + } + job_log(j, LOG_DEBUG, "Job wants to move to %s session.", session_name); if( !job_assumes(j, pid1_magic == false) ) { -- 2.45.2