I like the idea of this patch and am on board with using this functionality.
However, I tried to apply it and, after working around some changes in our Makefile, I found that the parts of the code that set up PAM do not compile anymore. Specifically the calls to "PAM_FAIL_CHECK" will not compile because they expand to call a function called "log" which conflicts with the math.h log() function. If someone updates the patch and re-submits I'll be happy to apply this upstream. Jesse (upstream dev)

