News for hackers. Stuff that matters.
Re:The Sheer Terror of PAM by kelnos on Tuesday September 06, 2022 @12:01AM (#32732672)
Yeah I was pretty disappointed, was hoping for something more. Most of the problems the author ran into had nothing to do with PAM. Things like "distributions compile PAM without debug logging" (annoying but common) and "PAM is a plugin system, so setting breakpoints is hard because dlsym() is used" (how else would you implement a plugin system in C, without requiring build-time foreknowledge of every plugin that exists?) and then some misconception that this is a "Java kind of thing" because Sun did it (when libdl predates Java and is by no means a Sun-specific thing, even though it was indeed first seen in SunOS).

It just felt like reading about someone who hasn't used C all that much, digging into a C-based project and discovering how some not-particularly-esoteric things are usually done in C ("function pointers aren't type-safe!") and then being surprised... and disgusted in a pretty "language elitist" way.

PAM is by no means an amazing piece of software. It has some baked-in assumptions that made sense 30 years ago that maybe don't so much these days. And it could be designed in a way that's more secure (though I expect you could reimplement PAM with better isolation while still keeping the API and flexibility). But it's... surprisingly not that bad, considering its age.

Re:The Sheer Terror of PAM by commandlinefan on Wednesday September 07, 2022 @03:33PM (#32755523)
I was really hoping for something that actually explained the history behind PAM and why it is the way it is, because PAM doesn't really make a whole heck of a lot of sense - usually when that's the case, understanding the context it was developed in goes a long way to explaining why it was done the way it was. Definitely not what this article was, though.