diff options
Diffstat (limited to 'modules/pam_unix')
-rw-r--r-- | modules/pam_unix/passverify.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index e79b55e6..078adc62 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -417,12 +417,9 @@ PAMH_ARG_DECL(char * create_password_hash, #endif sp = stpcpy(salt, algoid); if (on(UNIX_ALGO_ROUNDS, ctrl)) { - sp += snprintf(sp, sizeof(salt) - 3, "rounds=%u$", rounds); + sp += snprintf(sp, sizeof(salt) - (16 + 1 + (sp - salt)), "rounds=%u$", rounds); } - crypt_make_salt(sp, 8); - /* For now be conservative so the resulting hashes - * are not too long. 8 bytes of salt prevents dictionary - * attacks well enough. */ + crypt_make_salt(sp, 16); #ifdef HAVE_CRYPT_GENSALT_R } #endif |