Earlier quoted context omitted.
PAM really needs to be ravamped and support for (among other things) running multiple stacks in par@llel added. This way you could ask for a password OR a fingerprint
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?
A GTK4 SSH-askpass in Zig
21–28 of 28 posts
Re: A GTK4 SSH-askpass in Zig
#22Earlier quoted context omitted.
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?
Implementation language is incidental. Rust is... fine, I guess? But I wouldn't mandate modules use it. What's important is to move PAM out of process and sandbox the process host (using landlock, namespaces like bwrap, whatever) so we can run sensitive code with least-privilege on both ends.
Really it should probably be part of SystemD, but I know that would anger the anti-SystemD zealots.
Re: A GTK4 SSH-askpass in Zig
#23Nice, I just use lxqt-openssh-askpass, but I am on X11. A lighter alternative (for single-text input) would be FLTK. Version 1.4 is really nice, with Wayland support, and they even draw custom window decorations on GNOME. Both Cairo and FLTK should be able to compile with -X; not sure, though, about the status of the Zig bindings.
fltk is c++ based which makes language bindings significantly harder in general. gtk is c based which worked out really well in that aspect.
Re: A GTK4 SSH-askpass in Zig
#24Earlier quoted context omitted.
Implementation language is incidental. Rust is... fine, I guess? But I wouldn't mandate modules use it. What's important is to move PAM out of process and sandbox the process host (using landlock, namespaces like bwrap, whatever) so we can run sensitive code with least-privilege on both ends.
Yeah I always thought the whole architecture of PAM being a library is weird. A sane person would have made it a Daemon that processes talk to surely? 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
Re: A GTK4 SSH-askpass in Zig
#25I wrap `pinentry` (which is in the dependency trees of gnupg, pacman, gvfs, udisks2 and other software that you can de-facto depend on on desktops) inside my own simple askpass. $ cat ~/scripts/pinentry-askpass #!/usr/bin/env bash pinentry It automatically launches the GTK, TTY, or QT version depending on your environment. It's also useful for agents to use sudo, you can write in instructions to tool-call `sudo -A` a…
Re: A GTK4 SSH-askpass in Zig
#26I wrap `pinentry` (which is in the dependency trees of gnupg, pacman, gvfs, udisks2 and other software that you can de-facto depend on on desktops) inside my own simple askpass. $ cat ~/scripts/pinentry-askpass #!/usr/bin/env bash pinentry It automatically launches the GTK, TTY, or QT version depending on your environment. It's also useful for agents to use sudo, you can write in instructions to tool-call `sudo -A` a…
Any reason you don't use `pinentry-gnome3` from the `pinentry` package? Your wrapper is clever but doesn't work with gpg-agent.
You can change it I suppose, I don't thing I use gpg-agent often.
Re: A GTK4 SSH-askpass in Zig
#27Earlier quoted context omitted.
Implementation language is incidental. Rust is... fine, I guess? But I wouldn't mandate modules use it. What's important is to move PAM out of process and sandbox the process host (using landlock, namespaces like bwrap, whatever) so we can run sensitive code with least-privilege on both ends.
Yeah I always thought the whole architecture of PAM being a library is weird. A sane person would have made it a Daemon that processes talk to surely? Really it should probably be part of SystemD, but I know that would anger the anti-SystemD zealots.
For a PAM replacement, you want a separate process. It doesn't have to be a persistent separate process.
Re: A GTK4 SSH-askpass in Zig
#28Earlier quoted context omitted.
Yeah I always thought the whole architecture of PAM being a library is weird. A sane person would have made it a Daemon that processes talk to surely? Really it should probably be part of SystemD, but I know that would anger the anti-SystemD zealots.
> A sane person would have made it a Daemon that processes talk to surely? > Really it should probably be part of SystemD https://github.com/systemd/systemd/pull/39855