Revision
23422
Author
zarzycki@apple.com
Date
2007-09-20 16:22:05 -0700 (Thu, 20 Sep 2007)

Log Message

We've already dropped privs. Use a different check.

Modified Paths

Diff

Modified: trunk/launchd/src/launchd_core_logic.c (23421 => 23422)


--- trunk/launchd/src/launchd_core_logic.c	2007-09-20 23:05:54 UTC (rev 23421)
+++ trunk/launchd/src/launchd_core_logic.c	2007-09-20 23:22:05 UTC (rev 23422)
@@ -2947,7 +2947,7 @@
 	 * believe that prevents launchd from being able to send signals to
 	 * setuid children. We'll settle for process-groups.
 	 */
-	if (getuid()) {
+	if (getppid() != 1) {
 		job_assumes(j, setpgid(0, 0) != -1);
 	} else {
 		job_assumes(j, setsid() != -1);