• 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: AuthorizationExecuteWithPrivileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Toggle drawer from the menu with a multi-document program
  • Next by Date: Re: Selection and insertion point handling w/ NSTextAttachments
  • Previous by thread: Re: Toggle drawer from the menu with a multi-document program
  • Next by thread: Re: Selection and insertion point handling w/ NSTextAttachments
  • Index(es):
    • Date
    • Thread