• 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
CFPreferencesSetValue in pref pane not working if logged in as non-admin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFPreferencesSetValue in pref pane not working if logged in as non-admin


  • Subject: CFPreferencesSetValue in pref pane not working if logged in as non-admin
  • From: "Kevin Bohan" <email@hidden>
  • Date: Tue, 13 Nov 2001 14:21:52 +0000

Hi,

I have a pref pane that allows any user to change global (shared) settings. As the pane is manipulating global settings the associated pref file in located in /Library/Preferences, not in ~/Library/Preferences. To store the value in that domain I do the following:

CFPreferencesSetValue(str, tempNum, MY_PREF_FILE_NAME, kCFPreferencesAnyUser, kCFPreferencesCurrentHost);

However I have noticed that if I log in as a non admin user this function appears to fail, as does the get function.

What this means is that I can log in as an admin, use the preference pane and the settings will be saved, and can be viewed by any other admin. If I log in as a non-admin my pref pane resorts to showing default values (same as if there was no preference file) and I cannot change any of the settings.

The easiest way to see this in action is when I log in as a non-admin, open the pref pane, change something and then close System Preferences, open it again and see the the value have not changed.

I presume this has something to do with authorization. However, I can see nothing in the documentation of the CFPreferences... functions that say I need to wrap these calls in some kind of authorization.

Any one see where I'm going wrong?

Kirby


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


  • Follow-Ups:
    • Re: CFPreferencesSetValue in pref pane not working if logged in as non-admin
      • From: Chris Parker <email@hidden>
    • Re: CFPreferencesSetValue in pref pane not working if logged in as non-admin
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: Still about bad documentation
  • Next by Date: Outline view questions (hide items & multiple line text)
  • Previous by thread: Re: Still about bad documentation
  • Next by thread: Re: CFPreferencesSetValue in pref pane not working if logged in as non-admin
  • Index(es):
    • Date
    • Thread