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

Re: Using MoreSCF


  • Subject: Re: Using MoreSCF
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 7 Oct 2002 17:34:29 -0500

At 4:54 PM +0100 10/7/02, <email@hidden> wrote:
I have seen the AuthSample, but this says that GUI applications shouldn't
be able to have root privileges which seems strange to me, and the sample is
presently confusing.

It's correct. And the sample isn't very confusing if you take the time to understand what it's doing rather than just rushing off blindly to get your application working and shipped. If you're going to be making changes to the configuration of a user's Macintosh, it is *vitally important* that you understand exactly how AuthSample works and exactly *why* AuthSample is structured the way it is.

To make changes to the system configuration database from your application, your application needs a separate tool that can be run with elevated privileges and which makes those changes on behalf of the application. This tool needs to follow the design pattern described in AuthSample, and it *must* *must* *must* be bulletproof as it will be setuid-root.

I would have thought, that if a process wants root privileges, the process
calls an API, which causes a dialog to appear similar to clicking on the
unlock button in the system preferences (network settings), so the user is
fully aware that we are going to change something.

That's what it looks like to the user. But in the Unix security model it is impossible to raise the privileges of an already-running process. You call the API, the user is presented with the authorization alert, and then your application has an authorization reference which it passes (along with any other necessary data) to a setuid-root tool that actually performs the work.

-- Chris

--
Chris Hanson | Email: email@hidden
bDistributed.com, Inc. | Phone: +1-847-372-3955
Making Business Distributed | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: email@hidden
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Using MoreSCF (From: <email@hidden>)

  • Prev by Date: Re: Airport base station logging
  • Next by Date: Re: Security Info
  • Previous by thread: Re: Using MoreSCF
  • Next by thread: Re: Security Info
  • Index(es):
    • Date
    • Thread