deal with NULL gr_mem
This commit is contained in:
8
match.c
8
match.c
@@ -540,9 +540,11 @@ usergr_matches(group, user, pw)
|
||||
if (grp->gr_gid == user_groups[n])
|
||||
return(TRUE);
|
||||
}
|
||||
for (cur = grp->gr_mem; *cur; cur++)
|
||||
if (strcmp(*cur, user) == 0)
|
||||
return(TRUE);
|
||||
if (grp->gr_mem != NULL) {
|
||||
for (cur = grp->gr_mem; *cur; cur++)
|
||||
if (strcmp(*cur, user) == 0)
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user