Lines Matching refs:groups
81 gid_t *groups, *ggroups;
89 groups = NULL;
114 "Unable to obtain maximum number of groups");
118 groups = malloc(sizeof(groups[0]) * ngroups);
119 if (groups == NULL) {
120 pjdlog_error("Unable to allocate memory for %d groups.",
124 if (getgrouplist(user, pw->pw_gid, groups, &ngroups) == -1) {
125 pjdlog_error("Unable to obtain groups of user %s.", user);
163 if (setgroups(ngroups, groups) == -1) {
164 pjdlog_errno(LOG_ERR, "Unable to set groups");
214 pjdlog_error("Unable to allocate memory for %d groups.",
219 qsort(groups, (size_t)ngroups, sizeof(groups[0]), groups_compare);
221 PJDLOG_VERIFY(bcmp(groups, ggroups, sizeof(groups[0]) * ngroups) == 0);
229 if (groups != NULL)
230 free(groups);