pam-rs
pam-rs copied to clipboard
Implemented get_authtok()/pam_get_authtok().
Hi!
For simple auth scenarios having to bother with a conversation function is overkill in my view.
Therefore I added (by copying from get_user()
) one essential and missing PAM function, get_authtok()
(referring to pam_get_authtok()
) which is able to automatically prompt the user for a (non-echoed) authentication token or password.
As can be seen from the C side at https://web.archive.org/web/20190523222819/https://fedetask.com/write-linux-pam-module/#Authentication_function , pam_get_user()
and pam_get_authtok()
are sufficient to write succinct minimal auth libs.
For testing and demo I copied pam-sober
to pam-sober-2
and modified it.
Btw the Linux package pamtester
could be used as a replacement for test.c
but of course you lost the flexibility of a custom PAM testing application.
Regards