Re: [Q] copy operation and authorization
Re: [Q] copy operation and authorization
- Subject: Re: [Q] copy operation and authorization
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 12 Nov 2009 11:39:24 -0700
On Nov 12, 2009, at 11:34 AM, JongAm Park wrote:
>> You cannot escalate the privileges of a running task on Mac OS X. So if a running task does not have root privileges, then it never will.
>
> Then how?
That's what AEWP() is for. Once you've pre-authorized, you pass your authorization ref to AEWP(), and it will run the program you want it to run with root privileges. But you can never elevate the privileges of an unprivileged app, not even for one call.
Note that AEWP() does not run tasks _as_ root (and yes, there's a difference). If you need that, then you need to invoke AEWP() with a wrapper that sets the uid. Search the archives for details.
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