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