I've actually been working on patches to both libpam-heimdal and xdm. In xdm, I simply replace the second call to pam_setcred (the one in xc/programs/xdm/session.c) with pam_open_session.
In libpam-heimdal, I replace the existing open_session/close_session no-op functions with functions that setup and destroy the credentials cache. If I get this working, I would be happy to submit the patches for review/inclusion. Chip -- Charles M. "Chip" Coldwell System Administrator Harvard Physics Department 617-495-3388