[launchd-changes] [22874] trunk/launchd/src/launchd_mach_ipc.c
source_changes at macosforge.org
source_changes at macosforge.org
Sat Sep 23 13:25:10 PDT 2006
Revision: 22874
http://trac.macosforge.org/projects/launchd/changeset/22874
Author: zarzycki at apple.com
Date: 2006-09-23 13:25:10 -0700 (Sat, 23 Sep 2006)
Log Message:
-----------
Structural and semantic reorganization:
Some jobs, such as configd, are diligent about using bootstrap_unprivileged() before calling bootstrap_register().
Let's detect that and tie their calls to bootstrap_register() back to their job data structure.
Note, this will become free once some future redesign work is done that will turn bootstrap_unprivileged() into a no-op.
Modified Paths:
--------------
trunk/launchd/src/launchd_mach_ipc.c
Modified: trunk/launchd/src/launchd_mach_ipc.c
===================================================================
--- trunk/launchd/src/launchd_mach_ipc.c 2006-09-23 20:17:01 UTC (rev 22873)
+++ trunk/launchd/src/launchd_mach_ipc.c 2006-09-23 20:25:10 UTC (rev 22874)
@@ -244,12 +244,18 @@
kern_return_t
x_bootstrap_register(mach_port_t bp, audit_token_t au_tok, name_t servicename, mach_port_t serviceport)
{
- job_t j = job_find_by_port(bp);
+ job_t j2, j = job_find_by_port(bp);
struct machservice *ms;
struct ldcred ldc;
audit_token_to_launchd_cred(au_tok, &ldc);
+ j2 = job_find_by_pid(root_job, ldc.pid);
+
+ if (j2 && job_get_bs(j2) == j) {
+ j = j2;
+ }
+
job_log(j, LOG_NOTICE, "bootstrap_register() is deprecated. PID: %u Service: %s", ldc.pid, servicename);
job_log(j, LOG_DEBUG, "Mach service registration attempt: %s", servicename);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20060923/c4e3d716/attachment.html
More information about the launchd-changes
mailing list