Fix utmp setup broken by commit be0ca60facf8
This commit is contained in:
@@ -392,8 +392,6 @@ get_user_groups(struct user_details *ud)
|
|||||||
int i, len, maxgroups, group_source;
|
int i, len, maxgroups, group_source;
|
||||||
debug_decl(get_user_groups, SUDO_DEBUG_UTIL)
|
debug_decl(get_user_groups, SUDO_DEBUG_UTIL)
|
||||||
|
|
||||||
memset(ud, 0, sizeof(*ud));
|
|
||||||
|
|
||||||
maxgroups = (int)sysconf(_SC_NGROUPS_MAX);
|
maxgroups = (int)sysconf(_SC_NGROUPS_MAX);
|
||||||
if (maxgroups < 0)
|
if (maxgroups < 0)
|
||||||
maxgroups = NGROUPS_MAX;
|
maxgroups = NGROUPS_MAX;
|
||||||
@@ -455,6 +453,8 @@ get_user_info(struct user_details *ud)
|
|||||||
int fd, i = 0;
|
int fd, i = 0;
|
||||||
debug_decl(get_user_info, SUDO_DEBUG_UTIL)
|
debug_decl(get_user_info, SUDO_DEBUG_UTIL)
|
||||||
|
|
||||||
|
memset(ud, 0, sizeof(*ud));
|
||||||
|
|
||||||
/* XXX - bound check number of entries */
|
/* XXX - bound check number of entries */
|
||||||
user_info = reallocarray(NULL, 32, sizeof(char *));
|
user_info = reallocarray(NULL, 32, sizeof(char *));
|
||||||
if (user_info == NULL)
|
if (user_info == NULL)
|
||||||
|
Reference in New Issue
Block a user