passwd also use crypt_make_salt().

This commit is contained in:
nekral-guest 2007-11-20 09:51:36 +00:00
parent 0b695f5a76
commit 90de228897
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,8 @@
number of rounds. number of rounds.
* libmisc/salt.c, lib/getdef.c: ENCRYPT_METHOD and MD5_CRYPT_ENAB * libmisc/salt.c, lib/getdef.c: ENCRYPT_METHOD and MD5_CRYPT_ENAB
are needed also when USE_PAM (e.g. for chpasswd). are needed also when USE_PAM (e.g. for chpasswd).
* src/newusers.c, src/gpasswd.c: Use the new crypt_make_salt prototype * src/passwd.c, src/newusers.c, src/gpasswd.c: Use the new
crypt_make_salt prototype
* src/chpasswd.c, src/chgpasswd.c: Add option -c, --crypt-method * src/chpasswd.c, src/chgpasswd.c: Add option -c, --crypt-method
and -s, --sha-rounds to specify the crypt method and number of and -s, --sha-rounds to specify the crypt method and number of
rounds in case of one of the SHA methods. The new prototype of rounds in case of one of the SHA methods. The new prototype of

View File

@ -309,7 +309,7 @@ static int new_password (const struct passwd *pw)
/* /*
* Encrypt the password, then wipe the cleartext password. * Encrypt the password, then wipe the cleartext password.
*/ */
cp = pw_encrypt (pass, crypt_make_salt ()); cp = pw_encrypt (pass, crypt_make_salt (NULL, NULL));
memzero (pass, sizeof pass); memzero (pass, sizeof pass);
#ifdef HAVE_LIBCRACK_HIST #ifdef HAVE_LIBCRACK_HIST