Distributed Objects client/peer identification
Distributed Objects client/peer identification
- Subject: Distributed Objects client/peer identification
- From: Nicko van Someren <email@hidden>
- Date: Mon, 11 Feb 2008 14:22:31 +0000
I have a background agent and a System Preferences panel to allow the
user to configure it. They talk to each other using Distributed
Objects. The Programming Topics for DO tells me that the delegate of
the NSConnection gets asked to confirm is a new connection should be
allowed.
What I want to do is determine what task is trying to make the
connection to my application. In particular, I want to be able to
make sure that the other end of the connection is a task belonging to
the same user (for instance because some other user is also logged in
using fast user switching). It would seem that I might be able to do
this with some complex manipulation of Mach port rights, but if I
could just get the PID for the sender I can check if the process owner
is the same user and be done with the problem. So, does anyone know
who to find out where the other end of an NSConnection resides?
The ugly hack solution will be for the agent to put a random challenge
in temporary file only readable by the correct user and demand that
the SysPref plug-in send it a copy of the file, but I'd still like to
know how to identify the endpoints of an NSConnection!
Cheers,
Nicko
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden