Revision: 23280 http://trac.macosforge.org/projects/launchd/changeset/23280 Author: zarzycki@apple.com Date: 2007-06-18 14:05:29 -0700 (Mon, 18 Jun 2007) Log Message: ----------- <rdar://problem/5240036> Should start background session when a lookup of CCacheServer occurs Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2007-06-18 17:39:59 UTC (rev 23279) +++ trunk/launchd/src/launchd_core_logic.c 2007-06-18 21:05:29 UTC (rev 23280) @@ -5277,6 +5277,14 @@ job_log(j, LOG_DEBUG, "Mach service lookup forwarded: %s", servicename); *ptype = MACH_MSG_TYPE_MOVE_SEND; kr = bootstrap_look_up(inherited_bootstrap_port, servicename, serviceportp); + } else if (getpid() == 1 && j->anonymous && ldc.euid != 0 && strcasecmp(job_get_bs(j)->name, VPROCMGR_SESSION_LOGINWINDOW) == 0) { + /* + * 5240036 Should start background session when a lookup of CCacheServer occurs + * + * This is a total hack. We sniff out loginwindow session, and attempt to guess what it is up to. + * If we find a EUID that isn't root, we force it over to the per-user context. + */ + return VPROC_ERR_TRY_PER_USER; } else { job_log(j, LOG_DEBUG, "%sMach service lookup failed: %s", flags & BOOTSTRAP_PER_PID_SERVICE ? "Per PID " : "", servicename); kr = BOOTSTRAP_UNKNOWN_SERVICE;
participants (1)
-
source_changes@macosforge.org