Skip to content

Commit

Permalink
Fix a typo found using codespell tool
Browse files Browse the repository at this point in the history
* modules/pam_pwhistory/pam_pwhistory.c: Replace "crypted password" with
"hashed password" in comment.
* modules/pam_unix/passverify.c (create_password_hash): Rename "crypted"
local variable to "hashed".
  • Loading branch information
ldv-alt committed Sep 3, 2021
1 parent 49e3ffc commit 40f7d85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/pam_pwhistory/pam_pwhistory.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ run_check_helper(pam_handle_t *pamh, const char *user,
return retval;
}

/* This module saves the current crypted password in /etc/security/opasswd
/* This module saves the current hashed password in /etc/security/opasswd
and then compares the new password with all entries in this file. */

int
Expand Down
6 changes: 3 additions & 3 deletions modules/pam_unix/passverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,18 @@ PAMH_ARG_DECL(char * create_password_hash,
algoid = "$6$";
} else { /* must be crypt/bigcrypt */
char tmppass[9];
char *crypted;
char *hashed;

crypt_make_salt(salt, 2);
if (off(UNIX_BIGCRYPT, ctrl) && strlen(password) > 8) {
strncpy(tmppass, password, sizeof(tmppass)-1);
tmppass[sizeof(tmppass)-1] = '\0';
password = tmppass;
}
crypted = bigcrypt(password, salt);
hashed = bigcrypt(password, salt);
memset(tmppass, '\0', sizeof(tmppass));
password = NULL;
return crypted;
return hashed;
}

#if defined(CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY) && CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY
Expand Down

0 comments on commit 40f7d85

Please sign in to comment.