Use the correct login class when setting a new password.

PR:		65557, 72949
Submitted by:	Stephen P. Cravey <clists@gotbrains.org>
Approved by:	re (scottl)
MFC after:	2 weeks
This commit is contained in:
Dag-Erling Smørgrav 2005-07-05 18:42:18 +00:00
parent e5f9856fd5
commit d3cf5f1524

View File

@ -372,7 +372,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
return (PAM_BUF_ERR);
pwd->pw_change = 0;
lc = login_getclass(NULL);
lc = login_getclass(pwd->pw_class);
if (login_setcryptfmt(lc, password_hash, NULL) == NULL)
openpam_log(PAM_LOG_ERROR,
"can't set password cipher, relying on default");