Re: Running a tool authorized as root
Re: Running a tool authorized as root
- Subject: Re: Running a tool authorized as root
- From: BK <email@hidden>
- Date: Sat, 20 Aug 2005 17:26:46 +0900
On Aug 20, 2005, at 12:02, email@hidden wrote:
I want to run a tool that needs to be run by the root user. I can get
it to work the first time, but never after that.
How I want the app to work:
Users clicks button on UI
Have the user authenticate
Run the tool
Deauthenticate
The first time works without a problem. However everytime after that
I get the error -60031. I /do/ want the user to authenticate
everytime they click the button. What my code basically looks like
is:
AuthorizationCreate()
AuthorizationCopyRights()
AuthorizationExecuteWithPrivileges()
AuthorizationFree()
If you want the user to have to authenticate every single time, then
you don't need to pre-authorise. Just call
AuhorizationExecuteWithPrivileges() and that will bring up the
authentication panel automatically.
if you want to check out some example code ...
http://www.sunrise-tel.com/STSAsteriskInterfaceLibrary.html
scroll down to Class AstAuth
rgds
bk
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
_______________________________________________
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