Re: Running an App as Root
Re: Running an App as Root
- Subject: Re: Running an App as Root
- From: Chris Hanson <email@hidden>
- Date: Tue, 4 Nov 2003 19:01:43 -0600
On Nov 4, 2003, at 4:43 PM, David Blanton wrote:
How can I distribute an app that will run as Root? I want to run
scripts
(chmod, chown) from the app that require Root privileges using NSTask.
You don't. What you do is distribute an application that runs as a
normal user, but that includes a helper tool that can be invoked uusing
the Security framework that performs tightly-constrained tasks as root.
This is what displays the standard authentication panel to users.
See Apple's sample code on their developer web site -- AuthSample and
MoreAuthSample -- and the documentation for the Security framework for
more details on how to actually do this. And be sure to understand
exactly how AuthSample and MoreAuthSample actually work before leaping
into your own code.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Outsourcing Vendor Evaluation | Phone: +1-847-372-3955
Custom Mac OS X Development | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.