• 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: Run a process as root (asking only one time the root password)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run a process as root (asking only one time the root password)


  • Subject: Re: Run a process as root (asking only one time the root password)
  • From: "Finlay Dobbie" <email@hidden>
  • Date: Thu, 21 Jun 2007 16:01:03 +0100

On 21/06/07, Hell's KItchen Hell's KItchen <email@hidden> wrote:
Hello guys,
I need to execute a command-line process as root. I've tried using
NSTask and BLAuthentication class (Security Framework). Everything
works fine but each new start of the program will require again that
password. So my question... is possible to authenticate only one time
the app and mantain that privileges between multiple sessions?
I've discovered some infos about setuid. Is it the right solution? How
can I use it?

Yes, you will need to have a privileged helper tool of some sort. This is a somewhat tricky topic, I suggest you read the documentation on Authorization Services and spend some time familiarizing yourself with the relevant sample code. You must be very careful, otherwise you may be creating local privilege escalation security vulnerabilities.

-- Finlay
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Run a process as root (asking only one time the root password) (From: "Hell's KItchen Hell's KItchen" <email@hidden>)

  • Prev by Date: Run a process as root (asking only one time the root password)
  • Next by Date: Re: Run a process as root (asking only one time the root password)
  • Previous by thread: Run a process as root (asking only one time the root password)
  • Next by thread: Re: Run a process as root (asking only one time the root password)
  • Index(es):
    • Date
    • Thread