Re: NSTask with Root Privs
Re: NSTask with Root Privs
- Subject: Re: NSTask with Root Privs
- From: Finlay Dobbie <email@hidden>
- Date: Sun, 27 May 2001 16:12:42 +0100
OK, well I'm doing that, but there's no easy way of getting the PID of
the process that is spawned by the AuthorizationExecuteWithPrivileges()
function. The only way I can think of doing that is by using a wrapper
program which takes the argument of a path, so it does like this:
/path/to/theApplicationBundle/Resources/commandwrapper /usr/bin/whoami
<starts /usr/bin/whoami>
34359 (returns the PID of the process started)
<exit>
but that's just PureEvil
On Saturday, May 26, 2001, at 09:17 pm, Stefan Arentz wrote:
On Sat, May 26, 2001 at 08:35:32PM +0100, Finlay Dobbie wrote:
I've seen the Security Framework, but to be quite honest with you it's
lame. It involves lots of evil C calls... Why can't I just have a nice
little easy way of gaining root privs for NSTasks? I'm sure there was
an
easier way in the Public Beta using NIInterface.framework, but that's
now private.
Any ideas?
Yes. Spend an hour to study the code from the article at stepwise [1]
and
then another hour to wrap it all up in a nice objective c object?
[1] http://www.stepwise.com/Articles/Technical/2001-03-26.01.html
Can't expect from Apple to do *everything* :-)