* src/groupmems.c: When removing an user, check if deluser is on
the list, not adduser. This fixes a segmentation fault for every call of groupmems -d. * libmisc/list.c: Add assertions to help identifying these issues. * libmisc/list.c: Avoid implicit conversion of pointers to booleans.
This commit is contained in:
@@ -291,7 +291,7 @@ int main (int argc, char **argv)
|
||||
fail_exit (13);
|
||||
}
|
||||
} else if (NULL != deluser) {
|
||||
if (!is_on_list (grp->gr_mem, adduser)) {
|
||||
if (!is_on_list (grp->gr_mem, deluser)) {
|
||||
fprintf (stderr,
|
||||
_("%s: user '%s' is not a member of '%s'\n"),
|
||||
Prog, deluser, grp->gr_name);
|
||||
|
||||
Reference in New Issue
Block a user