aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/passverify.c
diff options
context:
space:
mode:
authorHulto <jack.m.mckenna@gmail.com>2019-01-23 22:40:23 -0500
committerTomáš Mráz <t8m@users.noreply.github.com>2020-01-15 18:18:15 +0100
commitded7401a0bc743aaffa785a8b015ceec7780462d (patch)
tree2d4e64b67bffc01ba91dcc6698bd84912c797a9c /modules/pam_unix/passverify.c
parent338189fddbb7a5deabf8eb3b82d7e40b65c733a6 (diff)
downloadpam-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.c14
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 */