|
|
|
|
|
by throwaway09223
1382 days ago
|
|
"The fact that it's written in C" The calling convention is C, but you can write PAM in any language. "and is linked into another program as a library makes it impossible to fully isolate it from its host application" Huh? You can never isolate the client side code. You will always have something in your app. "I think a sane, modern version of PAM should be a service and only communicate via a UNIX socket." So, write a module that talks to a socket. That's how like half of the PAM modules already operate. You will always have to have code in the application to talk to whatever oracle you're using. What you're describing here isn't any different from how PAM already works. |
|
Yes, and that "something" can be reduced to reads and writes to a socket.
> So, write a module that talks to a socket. That's how like half of the PAM modules already operate.
I mean move all of PAM to a service. So for instance currently chsh is a setuid application because it needs to be able to write to /etc/passwd. This is a requirement because the way it works is that it links to libpam, which will load a module, which will write to /etc/passwd, all inside the 'chsh' program.
My suggestion would result in chsh becoming a completely unprivileged application that only deals with interfacing with the user, then passes the action to pamd, which would run with the required privileges.