]> granicus.if.org Git - sudo/commitdiff
now uses user_gid
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 28 May 1996 02:42:57 +0000 (02:42 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 28 May 1996 02:42:57 +0000 (02:42 +0000)
parse.c

diff --git a/parse.c b/parse.c
index cc776b98de6d7d8937e22262a287e83cacb0116a..3bb6af6776656cc6113072d00da81c8a3d9905dc 100644 (file)
--- a/parse.c
+++ b/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++) {