I'm building an app that uses a daemon to communicate with a server to do the heavy lifting. The GUI app is used to configure and control the daemon, and daemon's executable is built into the app's package. It's started by launchd with a plist in /Library/LaunchDaemons/.

The daemon needs a username and password to authenticate against the server. I've been able to send the credentials from the GUI app to the daemon using distributed notification. Since the daemon needs these credentials before any user is logged in, I store them in the System keychain (which is the default when using Keychain services from a launchd daemon). I also save the last-used username in the daemon's prefs plist, so that at next reboot, it knows which keychain item to retrieve.

When first storing an item, it works fine. Once the app is recompiled, though, the item can't be retrieved, presumably because the daemon executable's signature changed. If this was a GUI app, the Leopard would pop a dialog notifying the user of the change and asking for permission. However, since it's a daemon, no user interaction is allowed.

Is the System keychain an appropriate place to keep a daemon's credentials? If so, how can I get access to the item even after a new version of the daemon executable?

----
Karl Moskowski <[EMAIL PROTECTED]>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to