Skip to content

Implemented get_authtok()/pam_get_authtok().#14

Open
prof79 wants to merge 1 commit intoanowell:masterfrom
prof79:getauth
Open

Implemented get_authtok()/pam_get_authtok().#14
prof79 wants to merge 1 commit intoanowell:masterfrom
prof79:getauth

Conversation

@prof79
Copy link

@prof79 prof79 commented Apr 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant