[OpenAFS-devel] afs_pam2 - A simplier approach to AFS integration during login

Russ Allbery rra@stanford.edu
Fri, 15 Apr 2005 16:00:58 -0700


Kyle Moffett <mrmacman_g4@mac.com> writes:

> Why not just shut down the thread in your PAM resource cleanup routine?
> It's kinda complicated, especially if you want to support multithreaded
> PAM apps, but basically each PAM handle can have resources attached to
> it by name.  When the PAM handle is destroyed or the resource
> overwritten, the resource's registered cleanup function vector is
> called.  If you use that to free up memory and stop the thread if the
> last request just ended, then everything should work properly.

Sounds good to me.  Are there details somewhere on exactly what needs to
be shut down?

Oh, and that's right, pam_afs currently already forks and does the
authentication in a subprocess; doesn't that already pretty much take care
of this problem by killing any spawned threads when the subprocess exits?

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>