• 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: Preferences, Authorization, Writing files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preferences, Authorization, Writing files


  • Subject: Re: Preferences, Authorization, Writing files
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 7 Feb 2003 10:05:33 -0600

At 7:38 PM -0700 2/6/03, Frank Fenn wrote:
5) Now I change some settings and want to overwrite the existing data but this will fail, since a normal user has no write access
to the directories mentioned above. But even with authentication services (which rights shall I obtain?) and an admin user name
password the NSArchive operation failed. What am I doing wrong here?

It sounds like you're assuming that Authorization Services will grant privileges to your preference pane. It won't. In Unix privileges can't be granted to running processes, they can only be granted to new processes or reduced for running processes.

To write your data, you'll need to run a small helper utility with administrator privileges using Authorization Services. There's sample code on Apple's web site demonstrating how to do this.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | 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.

  • Follow-Ups:
    • Re: Preferences, Authorization, Writing files
      • From: Frank Fenn <email@hidden>
    • Re: Preferences, Authorization, Writing files
      • From: Finlay Dobbie <email@hidden>
References: 
 >Preferences, Authorization, Writing files (From: Frank Fenn <email@hidden>)

  • Prev by Date: Re: dismissing sheets.
  • Next by Date: Re: NSListView "filter" a la Mail
  • Previous by thread: Re: Preferences, Authorization, Writing files
  • Next by thread: Re: Preferences, Authorization, Writing files
  • Index(es):
    • Date
    • Thread