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

When running a command as the invoking user we cannot use the gid

list from the front-end since it may not correspond to the user's
aux group vector as defined by the group database.
This commit is contained in:
Todd C. Miller
2017-11-28 09:48:43 -07:00
parent dd47a0a416
commit 250209d7a8
8 changed files with 84 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1993-1996, 1998-2016 Todd C. Miller <Todd.Miller@courtesan.com>
* Copyright (c) 1993-1996, 1998-2017 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -732,7 +732,7 @@ init_vars(char * const envp[])
}
}
if (user_gid_list == NULL)
user_gid_list = sudo_get_gidlist(sudo_user.pw);
user_gid_list = sudo_get_gidlist(sudo_user.pw, ENTRY_TYPE_ANY);
/* Store initialize permissions so we can restore them later. */
if (!set_perms(PERM_INITIAL))