News for hackers. Stuff that matters.
Re:The Surreal Horror of PAM (2021) by dmitrygr on Monday October 24, 2022 @07:06PM (#33323827)
> how do you debug PAM?

> It ain’t easy.

VMWare workstation has a built-in gdb stub that can debug guest kernel, or any Linux guest userspace process quite easily. There is also support for windows guests, and even a visual studio plugin for that. I am surprised this did not come up as a very simple option to do this.

Re:The Surreal Horror of PAM (2021) by xena on Monday October 24, 2022 @07:48PM (#33324231)
I go into more detail about this in my followup talk: https://xeiaso.net/talks/rustconf-2022-sheer-terror-pam#:~:t....

It is not easy in the slightest. PAM has aged like bottled milk in a desert.

Re:The Surreal Horror of PAM (2021) by monocasa on Monday October 24, 2022 @08:53PM (#33324773)
Can confirm from being the maintainer of a PAM module in a past job. The only thing that was stable was debug builds that enabled awful fprintfs to a file in /tmp. It felt like how a freshman in college debugs their code.
Re:The Surreal Horror of PAM (2021) by tbrownaw on Monday October 24, 2022 @10:33PM (#33325481)
So what's a proper way to solve the problem that PAM solves? Instead of an in-process library, have it be a daemon that responds to DBUS requests?

Aside from the config language, this sounds mostly like "it's a pre-login modular C library, and that's alien territory".

Re:The Surreal Horror of PAM (2021) by xena on Monday October 24, 2022 @10:39PM (#33325520)
It would probably need kernel support for this to happen, but I'd like to see a daemon in the system that runs authentication logic and then arbitrarily curses the requesting process with the UID/GID/whatever it needs to get the job done.
Re:The Surreal Horror of PAM (2021) by stevekemp on Tuesday October 25, 2022 @05:18AM (#33328138)
How would that work with, for example a single deamon supporting multiple (different) remote users - for example ftpd, or sshd?

(I imagine you could say that sshd forks for each user, but some of the legacy systems like ftpd/ircd wouldn't have that as an option..)

Re:The Surreal Horror of PAM (2021) by kaba0 on Monday October 24, 2022 @11:57PM (#33326022)
I think Android has a more saner system, but I’m a layperson when it comes to these — android runs every user process under a different user that has very restricted access (restricted with SELinux as well), and they do extensive IPC. There is a daemon that handles elevated requests through IPC, so that’s where dynamic access control happens.
Re:The Surreal Horror of PAM (2021) by collegeburner on Monday October 24, 2022 @08:13PM (#33324448)
forget debugging, just configuring PAM is a freaking nightmare. oh and make a mistake? can't log in to fix it lmao. i got really good about keeping a root shell open after i made that mistake a few times.