Modified: trunk/launchd/src/launchd_core_logic.c (23279 => 23280)
--- 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;