Set the shadow's password instead of the passwd's password.

Fix wrong cut&paste.
This commit is contained in:
nekral-guest 2008-02-10 19:14:20 +00:00
parent 132eb55983
commit ead95673a5
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-02-10 Nicolas François <nicolas.francois@centraliens.net>
* src/newusers.c: Set the shadow's password instead of the
passwd's password. Fix wrong cut&paste.
2008-02-03 Nicolas François <nicolas.francois@centraliens.net>
* src/usermod.c: Use a function to convert the dates from

View File

@ -383,7 +383,7 @@ static int add_passwd (struct passwd *pwd, const char *password)
*/
spent.sp_namp = pwd->pw_name;
if ((crypt_method != NULL) && (0 == strcmp(crypt_method, "NONE"))) {
pwd->pw_passwd = (char *)password;
spent.sp_pwdp = (char *)password;
} else {
const char *salt = crypt_make_salt (crypt_method, crypt_arg);
spent.sp_pwdp = pw_encrypt (password, salt);