Revision
22937
Author
zarzycki@apple.com
Date
2006-11-06 17:31:26 -0800 (Mon, 06 Nov 2006)

Log Message

<rdar://problem/4821335> SecurityAgent crashes in InitializeDragIPC

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (22936 => 22937)


--- trunk/launchd/src/launchd_core_logic.c	2006-11-03 21:23:01 UTC (rev 22936)
+++ trunk/launchd/src/launchd_core_logic.c	2006-11-07 01:31:26 UTC (rev 22937)
@@ -3761,7 +3761,12 @@
 
 	job_log(j, LOG_DEBUG, "Mach service registration attempt: %s", servicename);
 
-	if (j->anonymous && job_get_bs(j)->parent == NULL && ldc.uid != 0 && ldc.uid != getuid()) {
+	/*
+	 * From a per-user/session launchd's perspective, SecurityAgent (UID
+	 * 92) is a rogue application (not our UID, not root and not a child of
+	 * us). We'll have to reconcile this design friction at a later date.
+	 */
+	if (j->anonymous && job_get_bs(j)->parent == NULL && ldc.uid != 0 && ldc.uid != getuid() && ldc.uid != 92) {
 		if (getpid() == 1) {
 			return VPROC_ERR_TRY_PER_USER;
 		} else {