From: nekral-guest Date: Sun, 10 Feb 2008 19:14:20 +0000 (+0000) Subject: Set the shadow's password instead of the passwd's password. X-Git-Tag: 4.1.1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ead95673a56b18589394b81b0c0366f4230721f2;p=thirdparty%2Fshadow.git Set the shadow's password instead of the passwd's password. Fix wrong cut&paste. --- diff --git a/ChangeLog b/ChangeLog index 407d2ee3e..56c2ecb28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-10 Nicolas François + + * src/newusers.c: Set the shadow's password instead of the + passwd's password. Fix wrong cut&paste. + 2008-02-03 Nicolas François * src/usermod.c: Use a function to convert the dates from diff --git a/src/newusers.c b/src/newusers.c index 07de99c5a..9f2579a80 100644 --- a/src/newusers.c +++ b/src/newusers.c @@ -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);