ebroder / auto-aklog

Automatically get AFS tokens on OS X whenever your Kerberos tickets are renewed
MIT License
2 stars 0 forks source link

Doesn't work with Snow Leopard #1

Open ebroder opened 14 years ago

ebroder commented 14 years ago

Snow Leopard seems to have gotten rid of the login_logout_notification API that auto-aklog uses to hook credential changes, so auto-aklog basically needs to be completely re-written.

I see a few options for notifications that come from the CCacheServer when the credential cache collection gets updated, both in KerberosFramework/Kerberos5/Sources/ccapi/server/mac/ccs_os_notify.c:

  1. notify_post. CCacheServer uses notify_post(3) to send a "com.apple.Kerberos.cache.changed" message through the OS X notifyd whenever the credential cache collection changes.
  2. NSDistributedNotificationCenter. CCacheServer sends one of two messages through the distributed notification center when either a ccache or the ccache collection changes.

Unfortunately, I can't find a way to actually spawn a process (or call a particular piece of code) in response to either a notifyd message or a distributed notification, so auto-aklog may need to be come a background daemon that blocks on receiving one of those two notifications.

ebroder commented 14 years ago

One upside to this change, though, will be that you no longer have to go track down and make a change in a config file, which means that it'll be easier to automate installing auto-aklog.

ebroder commented 14 years ago

Ugh. Also, I can't find any evidence of either of those interfaces existing on 10.5, so I may be out of luck for creating an auto-aklog that works on multiple versions of OS X.