2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 05:17:54 +00:00

Missed piece from rev. 1.6, fix sudo_getpwnam() too.

This commit is contained in:
Todd C. Miller 2005-03-12 17:27:27 +00:00
parent 0ea568c7de
commit bb63e0168d

View File

@ -264,8 +264,8 @@ sudo_getpwnam(name)
* Cache passwd db entry if it exists or a negative response if not.
*/
if ((pw = getpwnam(name)) != NULL) {
pw->pw_passwd = sudo_getepw(pw); /* get shadow password */
pw = sudo_pwdup(pw);
pw->pw_passwd = sudo_getepw(pw); /* get shadow password */
if (rbinsert(pwcache_byname, (VOID *) pw) != NULL)
errorx(1, "unable to cache user name, already exists");
if (rbinsert(pwcache_byuid, (VOID *) pw) != NULL)