Re: Distributed objects: connecting to a process running as root?
Re: Distributed objects: connecting to a process running as root?
- Subject: Re: Distributed objects: connecting to a process running as root?
- From: James Bucanek <email@hidden>
- Date: Mon, 1 May 2006 08:18:46 -0700
Here's what I've learned. Hopefully, it's accurate and might be of use to others:
There are two concepts here (and probably why this was so confusing): Mach port namespaces. User sessions.
A user session is created for the system at startup and one for each user the logs into the system. Each session in turn creates a Mach port namespace. Sessions can create additional Mach port namespaces as needed (sshd is an example), but for the most part every service running in a session shares the same namespace.
The namespace of individual user sessions are enclosed in the namespace of the parent session (like a local variable in a function). Thus, child sessions have access to all the ports in their session in addition to all of the ports in their parent session. While processes in the parent session do not normally see the names of ports in a child session, they are allowed to communicate with them if the child passes them a reference to their port.
Ports registered in sister sessions (i.e. separate user sessions created by different logins) are in completely issolated sessions, and by extention namespaces. They cannot see the registered Mach ports in the sister session nor are they allowed to communication directly with a port in that session, even if they obtain a reference to that port.
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPMultipleUsers/>
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/>
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden