Re: AuthSample
Re: AuthSample
- Subject: Re: AuthSample
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 28 Oct 2007 16:36:13 -0600
On Oct 28, 2007, at 5:38 AM, Andrew James wrote:
I use a loader in my program to achieve root powers, however for
some reason
in leopard it has become broken. The code is based off authsample
and works
if i use a fork to execute the commands
(chown/chmod/kextload/kextunload/pmset) however if i place a simple
system()
call it fails to achieve the root powers. Now to my understanding a
fork
should have the exact same powers as the parent.
So does anyone know why the fork is needed?
I bet it failed for security reasons. system() invokes a command using
a shell, and running a shell as root (or with root privileges) is
generally a bad idea. Try using fork/exec instead of system().
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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
References: | |
| >AuthSample (From: "Andrew James" <email@hidden>) |