• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running a tool authorized as root
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Running a tool authorized as root (From: email@hidden)

  • Prev by Date: Re: [UPDATE] Lex/Yacc and Cocoa
  • Next by Date: Notification for Changed User Defaults
  • Previous by thread: Running a tool authorized as root
  • Next by thread: Notification for Changed User Defaults
  • Index(es):
    • Date
    • Thread