Re: Run a process as root (asking only one time the root password)
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