*list = xcalloc(1, ngroups * sizeof(gid_t));
+fprintf(stderr, "KZAK>>> alloc '%p' for %s\n", *list, pwd->pw_name);
+
+
/* now for the actual list of GIDs */
if (-1 == getgrouplist(pwd->pw_name, pwd->pw_gid, *list, &ngroups))
return -1;
break;
case COL_SGROUPS:
case COL_SGIDS:
- if (get_sgroups(&user->sgroups, &user->nsgroups, pwd))
+ if (!user->nsgroups &&
+ get_sgroups(&user->sgroups, &user->nsgroups, pwd) < 0)
err(EXIT_FAILURE, _("failed to get supplementary groups"));
break;
case COL_HOME:
}
if (rc || !user)
continue;
-
tsearch(user, &ctl->usertree, cmp_uid);
}
} else {