Re: AuthorizationExecuteWithPrivileges
Re: AuthorizationExecuteWithPrivileges
- Subject: Re: AuthorizationExecuteWithPrivileges
- From: "Louis C. Sacha" <email@hidden>
- Date: Wed, 6 Oct 2004 13:06:39 -0700
Hello...
Generally you wouldn't want to do this type of thing with
AuthorizationExecuteWithPrivileges(), and would instead create a
setuid helper tool that would check authorization once and then
perform the necessary actions.
There are C functions available that do the same thing as the chown
and chmod command line tools which you can use in your helper tool.
In the terminal type 'man 2 chown' and 'man 2 chmod' to get more info.
For more info about creating a setuid helper tool, check out the
sample code example "AuthSample" that Apple has available at the
developer.apple.com site.
Hope that helps,
Louis
Is there some sort of inherent limit on the number of times you can
call AuthorizationExecuteWithPrivileges()?
On my machine it always returns error -60031
(errAuthorizationToolExecuteFailure) on iteration 20.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden