On Jan 25, 2010, at 9:18 PM, Nick Zitzmann wrote:

> 
> On Jan 25, 2010, at 12:57 AM, Nyxem wrote:
> 
>> 1 - Using the authorizationRef object of my SFAuthorizationView and call 
>> AuthorizationExecuteWithPrivileges() ("/bin/launchctl load 
>> /Library/LaunchDaemons/com.mydaemon.plist")
>>      --> Failed. daemon not launched as root, but as current user.
> 
> As you've figured out, AEWP() launches apps with root privileges, but it 
> doesn't run them _as_ root. If you need to launch an app as root for whatever 
> reason via AEWP(), then search the archives for a workaround, because I'm 
> pretty sure I've posted at least one workaround for this years ago...
> 
> Nick Zitzmann
> <http://www.chronosnet.com/>

It launches the process with an *effective* UID of root. You should be able to 
make it run as root by using the setuid() function.

However, a better way to go would probably be to use the BetterAuthSample code.

Charles_______________________________________________

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