Missed piece from rev. 1.6, fix sudo_getpwnam() too.
This commit is contained in:
2
pwutil.c
2
pwutil.c
@@ -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)
|
||||
|
Reference in New Issue
Block a user