2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Replace sudo_fakepwnamid() with sudo_mkpwent() and don't return an

error if the entry already exists in the cache.
This commit is contained in:
Todd C. Miller
2013-04-19 14:48:23 -04:00
parent d913fe69c2
commit 5337da144b
3 changed files with 46 additions and 32 deletions

View File

@@ -562,7 +562,7 @@ init_vars(char * const envp[])
fatalx(_("unknown uid: %u"), (unsigned int) user_uid);
/* Need to make a fake struct passwd for the call to log_fatal(). */
sudo_user.pw = sudo_fakepwnamid(user_name, user_uid, user_gid);
sudo_user.pw = sudo_mkpwent(user_name, user_uid, user_gid, NULL, NULL);
log_fatal(0, N_("unknown uid: %u"), (unsigned int) user_uid);
/* NOTREACHED */
}