I'm vaguely considering rewriting PAM in Rust. It's definitely something that would benefit from Rust's extra security and the code quality isn't that great. Nor is the UX. What "among other things" were you thinking of?
Really it should probably be part of SystemD, but I know that would anger the anti-SystemD zealots.
> Really it should probably be part of SystemD
For a PAM replacement, you want a separate process. It doesn't have to be a persistent separate process.