mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-04 16:25:25 +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>
|
# include <malloc.h>
|
||||||
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
|
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/types.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
|
* 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);
|
return(TRUE);
|
||||||
|
|
||||||
for (cur=grpent->gr_mem; *cur; cur++) {
|
for (cur=grpent->gr_mem; *cur; cur++) {
|
||||||
|
Reference in New Issue
Block a user