Let's not pay the getpwuid() hit unless we have to...
--- trunk/launchd/src/launchd_core_logic.c 2006-10-26 18:56:25 UTC (rev 22922)
+++ trunk/launchd/src/launchd_core_logic.c 2006-10-26 18:57:29 UTC (rev 22923)
@@ -4054,7 +4054,9 @@
return BOOTSTRAP_NO_MEMORY;
}
- jr->mach_uid = ldc.uid;
+ if (getuid() == 0) {
+ jr->mach_uid = ldc.uid;
+ }
if (!job_setup_machport(jr)) {
job_remove(jr);