CFPreferences and non-root daemon
CFPreferences and non-root daemon
- Subject: CFPreferences and non-root daemon
- From: Marc Epard <email@hidden>
- Date: Fri, 08 Sep 2006 11:13:46 -0500
- Thread-topic: 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:
This email sent to email@hidden