mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
now uses user_gid
This commit is contained in:
3
parse.c
3
parse.c
@@ -54,6 +54,7 @@ static char rcsid[] = "$Id$";
|
||||
# include <malloc.h>
|
||||
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@@ -340,7 +341,7 @@ int usergr_matches(group, user)
|
||||
/*
|
||||
* Check against user's real gid as well as group's user list
|
||||
*/
|
||||
if (getgid() == grpent->gr_gid)
|
||||
if (grpent->gr_gid == user_gid)
|
||||
return(TRUE);
|
||||
|
||||
for (cur=grpent->gr_mem; *cur; cur++) {
|
||||
|
Reference in New Issue
Block a user