Communicating to a process started by root from non-root app
Communicating to a process started by root from non-root app
- Subject: Communicating to a process started by root from non-root app
- From: eveningnick eveningnick <email@hidden>
- Date: Mon, 3 Jan 2011 21:03:59 +0200
Hello
i have a daemon whose owner is wheel:root and which provides a Unix
Domain Socket where i can send/receive datagrams from my custom
Preference Pane.
The problem i have is that a socket, installed by a root-process can't
be "sent" by a non-root application, like System Preferences.
I guess i can deal with the problem the following way: i create one
more helper executable, which is "suid'ed", and "chown'ed" to root,
thus i can launch this helper tool simply for fork/exec'ing from my
non-root Preference Pane. This way i should establish two
"communication channels":
MyPrefPane ------------(pipe or UnDomSock)----------> HelperTool
-----------(UnDomSocket)------> Daemon
I am wondering if i could somehow increase System Preference's
privileges for a while, write to Daemon's socket directly, and
decrease privileges. Is that possble?
I have read AuthorizationServices reference, but still feel a little
misty about what can and can't be possibly done.
How do all other preference panes work? do they all load helper tools,
and there's no detour?
Thanks
_______________________________________________
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