Implemented get_authtok()/pam_get_authtok().#14
Open
prof79 wants to merge 1 commit intoanowell:masterfrom
Open
Implemented get_authtok()/pam_get_authtok().#14prof79 wants to merge 1 commit intoanowell:masterfrom
prof79 wants to merge 1 commit intoanowell:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 topam_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()andpam_get_authtok()are sufficient to write succinct minimal auth libs.For testing and demo I copied
pam-sobertopam-sober-2and modified it.Btw the Linux package
pamtestercould be used as a replacement fortest.cbut of course you lost the flexibility of a custom PAM testing application.Regards