* 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:
nekral-guest
2008-08-30 18:29:08 +00:00
parent 77f81fa0b6
commit 0c7df2f9a0
4 changed files with 23 additions and 4 deletions

View File

@@ -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);