initgroups: bug fix
authorAlan Cox <alan@linux.intel.com>
Fri, 25 Mar 2016 19:59:42 +0000 (19:59 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 25 Mar 2016 19:59:42 +0000 (19:59 +0000)
Library/include/grp.h
Library/libs/initgroups.c

index 9e0b980..4b9ca27 100644 (file)
@@ -29,8 +29,6 @@ extern int initgroups __P((const char * user, gid_t gid));
 
 extern struct group * __getgrent __P((int grp_fd));
 
-extern int initgroups(const char *__user, gid_t __group);
-
 extern char *_path_group;
 
 #endif /* _GRP_H */
index 660b6d6..4a6d17a 100644 (file)
@@ -40,8 +40,7 @@ int initgroups(const char *user, gid_t gid)
        group_list[num_groups] = gid;
        while (num_groups < GR_MAX_GROUPS &&
               (group = __getgrent(grp_fd)) != NULL) {
-               if (group->gr_gid != gid);
-               {
+               if (group->gr_gid != gid) {
                        tmp_mem = group->gr_mem;
                        while (*tmp_mem != NULL) {
                                if (!strcmp(*tmp_mem, user)) {