I've been trying to get imap and sqwebmail to use my user's Maildirs on AFS.
My biggest obstacle was getting authpam hold on to the AFS tokens obtained
by pam_krb5afs.  Here's a patch to the source which fixes a couple of bugs:

1. authpam didn't pass on the environment stored in pam_getenvlist().  Now
it does.

2. authpam used a weird forking mechanism so a child process can end the pam
session.  One process does pam, the other returns authentication success,
and when one dies, the other closes the session.  Too bad authlib doesn't
have a callback to clean up when the exec'ed process dies!  The problem is
that the pam state must be set in the process that eventually execs, to get
the pam tokens.  I changed the fork/wait mechanism to make that work.  There
must be a better way, though.  Is there a post-exec cleanup function called
in authpam?

Now my authdaemon can use pam to get krb5 and afs tokens. Hooray!

Here's my patch to courier-imap-1.4.3.

Noel Burton-Krahn



Attachment: courier-imap-1.4.3-noel.diff.gz
Description: GNU Zip compressed data

Reply via email to