Re: Start and stop a privileged service programmatically
Re: Start and stop a privileged service programmatically
- Subject: Re: Start and stop a privileged service programmatically
- From: Nicola Vitacolonna <email@hidden>
- Date: Mon, 10 Jul 2006 19:53:56 +0200
OpenVPN is an open source client/server, but I'd rather avoid
mangling the code if possible. And I should also point out that I
want to run the *client* (the server is always available on another
machine), which can be run as a daemon by passing the --daemon
option. Can this really be made to work "on demand"?
My initial idea was to build a preference pane to turn the connection
on and off. But, for some reason, I cannot make openvpn start up
correctly from code. In some more tests I have made, I have noticed a
"route: must be root to alter routing table" error when my
(authenticated) tool launches openvpn - which baffled me, because the
command is supposed to be executed with root privileges (I have
verified that uid = 501, euid = 0).
I like, however, "Apple's idealized view", if only I could implement
it. Where may I find more information: man pages only?
Nicola
On 10/lug/06, at 19:16, Dave Zarzycki wrote:
On Jul 8, 2006, at 12:45 PM, Nicola Vitacolonna wrote:
2) Is launchd to be preferred over other methods in this case? And
is it the way to go in general?
The preferred solution does not involve launchctl or programmatic
control whatsoever.
In Apple's idealized view of the universe, your VPN daemon would be
launch on demand via some IPC based mechanism. This has the nice
side effect of implicit correctness. From your client's
perspective, the daemon is virtually running all the time.
The only questions that remain are:
1) Do you have the source code to the VPN daemon and client?
2) Do you have the time to make some changes to the code?
davez
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden