Re: Communicating to a process started by root from non-root app
Re: Communicating to a process started by root from non-root app
- Subject: Re: Communicating to a process started by root from non-root app
- From: Wim Lewis <email@hidden>
- Date: Mon, 3 Jan 2011 11:13:11 -0800
On 3 Jan 2011, at 11:03 AM, eveningnick eveningnick wrote:
> 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.
Unless I'm forgetting something basic, you should be able to connect to your daemon's socket from a non-root process if you first change the permissions on the socket (using chmod, as if it were a file). The man page for the unix-domain protocol family alludes to this briefly:
> All addresses are absolute- or relative-pathnames of other UNIX-domain sockets. Normal filesystem access-control mechanisms are also applied when referencing pathnames; e.g., the destination of a connect(2) or sendto(2) must be writable.
_______________________________________________
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