Running a process with elevated privileges OS X 10.7 & 10.8
===

I'm trying to run a process with elevated privileges - specifically OpenVPN, which requires root privileges to add routes to the system.

Looking around for existing examples around leads me to `AuthorizationExecuteWithPrivileges`, which seems to be now deprecated.

I tried the new `SMJobBless` method but I have a few questions regarding its viability for this purpose. As I understand it, I can create a separate privileged tool and communicate with it via sockets to ask the tool to perform privileged commands. However, I can't seem to figure out how I can start the OpenVPN process and capture its standard output in real time doing it this way as the main application would not be starting the process itself.

Another option is to use setuid on the OpenVPN executable. Could I possibly use the helper installed by `SMJobBless` to set the file permissions and setuid on the executable, then run it normally via `NSTask`?