From: Apple Date: Wed, 23 Jun 2010 22:55:43 +0000 (+0000) Subject: launchd-329.3.2.tar.gz X-Git-Tag: mac-os-x-1065^0 X-Git-Url: https://git.saurik.com/apple/launchd.git/commitdiff_plain/62123c11d73b074206859f8a24f4e65c1d1e0061?hp=f271391cf54cba14d21d45675781491323ebe16d launchd-329.3.2.tar.gz --- 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) ) {