Thank you. I will try AuthorizationExecuteWithPrivileges().

JongAm Park

Nick Zitzmann wrote:
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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to