diff options
author | Hulto <jack.m.mckenna@gmail.com> | 2019-01-23 22:40:23 -0500 |
---|---|---|
committer | Tomáš Mráz <t8m@users.noreply.github.com> | 2020-01-15 18:18:15 +0100 |
commit | ded7401a0bc743aaffa785a8b015ceec7780462d (patch) | |
tree | 2d4e64b67bffc01ba91dcc6698bd84912c797a9c /modules/pam_unix/passverify.c | |
parent | 338189fddbb7a5deabf8eb3b82d7e40b65c733a6 (diff) | |
download | pam-ded7401a0bc743aaffa785a8b015ceec7780462d.tar.gz pam-ded7401a0bc743aaffa785a8b015ceec7780462d.tar.bz2 pam-ded7401a0bc743aaffa785a8b015ceec7780462d.zip |
Changed variable salt to hash
helper_verify_password's variable salt is not just the salt but the whole hash. Renamed for clarity and conformity with the rest of the code.
Diffstat (limited to 'modules/pam_unix/passverify.c')
-rw-r--r-- | modules/pam_unix/passverify.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 2f9a4306..e03e75b2 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -1080,21 +1080,21 @@ int helper_verify_password(const char *name, const char *p, int nullok) { struct passwd *pwd = NULL; - char *salt = NULL; + char *hash = NULL; int retval; - retval = get_pwd_hash(name, &pwd, &salt); + retval = get_pwd_hash(name, &pwd, &hash); - if (pwd == NULL || salt == NULL) { + if (pwd == NULL || hash == NULL) { helper_log_err(LOG_NOTICE, "check pass; user unknown"); retval = PAM_USER_UNKNOWN; } else { - retval = verify_pwd_hash(p, salt, nullok); + retval = verify_pwd_hash(p, hash, nullok); } - if (salt) { - _pam_overwrite(salt); - _pam_drop(salt); + if (hash) { + _pam_overwrite(hash); + _pam_drop(hash); } p = NULL; /* no longer needed here */ |