Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CFPreferences and non-root daemon



I'm moving root-requiring code out of a launchd-started daemon into a couple
small, focused executables.  It's going well except I've hit a snag with
CFPreferences.

I'm specifying kCFPreferencesCurrentApplication, KCFPreferencesAnyUser,
KCFPreferencesCurrentHost and CFPreferences works fine if I run the daemon
as root.  But if I run it as nobody, CFPreferencesSynchronize consistently
fails.  If I manually change the owner of the bundle.id.plist file that
CFPreferences creates to nobody, it works okay.

None of this is a particular surprise, but I'm wondering what to do about
it.  How should a non-root daemon store its preferences?  The daemon can
change its settings during execution, so a static config file is not an
option.  Is there a good way to get CFPreferences to work?

-Marc

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.