• 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: how to run my app in privileged mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run my app in privileged mode


  • Subject: Re: how to run my app in privileged mode
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 3 Jun 2008 21:08:56 +0200

Note that you should never run a GUI application with elevated provilege, particulary an application that uses AppKit, this is EVIL.

See man authopen(1). This is built-in an helper tool design to read and write file using auth services. It handle all the authorization part for you.

And before using ExecuteWithPrivileges, you must read this:

http://developer.apple.com/documentation/Security/Conceptual/SecureCodingGuide/Articles/AccessControl.html



Le 3 juin 08 à 20:37, Michael Vannorsdel a écrit :

You can't really upgrade an already running process's privilege level. What I'd suggest is make a small launcher program that the user opens. This would ask for the admin password and then launch your main application using AuthorizationExecuteWithPrivileges and friends.


On Jun 3, 2008, at 7:07 AM, Nick Rogers wrote:

Hi,
I wish to access disk sectors using open() and pread(). but it fails for the system disk.
So how can I get the user to type in admin passwd and then run my app in privileged mode.
Please point me to any sample code etc.
I tried ""BetterAuthorizationSample" code from apple, but using it to access disk sectors is 10 times slower then open() and pread(), cause it installs a helper tool in the system and to get sectors from it is slow.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: how to run my app in privileged mode
      • From: Charles Srstka <email@hidden>
References: 
 >how to run my app in privileged mode (From: Nick Rogers <email@hidden>)
 >Re: how to run my app in privileged mode (From: Michael Vannorsdel <email@hidden>)

  • Prev by Date: Re: Best Practice for Returning Immutable Objects?
  • Next by Date: NSPredicateEditorRowTemplate: Custom templateView state
  • Previous by thread: Re: how to run my app in privileged mode
  • Next by thread: Re: how to run my app in privileged mode
  • Index(es):
    • Date
    • Thread