My PAM module obtains the password from user with pam_get_authtok() and the pam_conv structure from pam_get_item(). Is it possible to forward this password (or modified one) to the next PAM module in the queue, so that it doesn't have to prompt the user for it again? If so, how can I do it?
On Tue, Jun 26, Piotr Dąbrowski wrote:
My PAM module obtains the password from user with pam_get_authtok() and the pam_conv structure from pam_get_item(). Is it possible to forward this password (or modified one) to the next PAM module in the queue, so that it doesn't have to prompt the user for it again? If so, how can I do it?
Like you get it: pam_set_authtok().
http://www.linux-pam.org/Linux-PAM-html/mwg-expected-by-module-item.html#mwg...
Thorsten
On Wed, 2012-06-27 at 14:45 +0200, Thorsten Kukuk wrote:
On Tue, Jun 26, Piotr Dąbrowski wrote:
My PAM module obtains the password from user with pam_get_authtok() and the pam_conv structure from pam_get_item(). Is it possible to forward this password (or modified one) to the next PAM module in the queue, so that it doesn't have to prompt the user for it again? If so, how can I do it?
Like you get it: pam_set_authtok().
http://www.linux-pam.org/Linux-PAM-html/mwg-expected-by-module-item.html#mwg...
Also note, that pam_get_authtok() already sets the appropriate pam item and there is no pam_set_authtok() the call is pam_set_item(pamh, PAM_AUTHTOK,..);
pam-developers@lists.fedorahosted.org