groups
void groups(struct pinfo *, VARENT *, enum mode);
VAR4("groups", "GROUPS", LJUST, groups),
gid_t *groups;
groups = ckmalloc((maxgroups + 1) * sizeof(gid_t));
n = getgroups(maxgroups, groups);
if (groups[n] == sp->st_gid) {
free(groups);
gid_t *groups, int *grpcnt)
groups[ngroups] = agroup;
if (grp->gr_gid == groups[i])
groups[ngroups] = grp->gr_gid;
getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
rv = getgroupmembership(uname, agroup, groups, *grpcnt, &groupc);
gid_t *groups = va_arg(ap, gid_t *);
(void) __gr_addgid(agroup, groups, maxgrp, groupc);
if (! __gr_addgid(grp.gr_gid, groups, maxgrp, groupc))
gid_t *groups = va_arg(ap, gid_t *);
(void) __gr_addgid(agroup, groups, maxgrp, groupc);
if (! __gr_addgid(grp.gr_gid, groups, maxgrp,
if (! __gr_addgid((gid_t)id, groups, maxgrp, groupc))
gid_t *groups = va_arg(ap, gid_t *);
(void) __gr_addgid(agroup, groups, maxgrp, groupc);
if (! __gr_addgid(grp.gr_gid, groups, maxgrp, groupc))
gid_t *groups;
&rerror, cp->uname, cp->agroup, cp->groups, cp->maxgrp, cp->groupc);
gid_t *groups = va_arg(ap, gid_t *);
(void) __gr_addgid(agroup, groups, maxgrp, groupc);
ggmstate.groups = groups;
if (! __gr_addgid(grp.gr_gid, groups, maxgrp, groupc))
gid_t *groups, int maxgrp, int *groupc)
&rerror, uname, agroup, groups, maxgrp, groupc);
__gr_addgid(gid_t gid, gid_t *groups, int maxgrp, int *groupc)
_DIAGASSERT(groups != NULL);
if (groups[dupc] == gid)
groups[*groupc] = gid;
gid_t *groups = groups_list;
if (getgrouplist(uname, agroup, groups, &ngroups) == -1) {
groups = calloc((size_t)maxgroups, sizeof *groups);
if (groups == NULL)
if (getgrouplist(uname, agroup, groups, &ngroups) == -1)
rval = setgroups(ngroups, groups);
rval = setgroups(ng, groups);
if (groups != groups_list)
free(groups);
groups++; \
int groups = 0;
padded -= groups;
gid_t groups[NGROUPS];
short ngroups = __arraycount(groups);
puffs_cred_getgroups(pcr, groups, &ngroups);
return rump_pub_cred_create(uid, gid, ngroups, groups);
gid_t *groups, *ng;
groups = NULL;
ng = realloc(groups, gsize * sizeof(gid_t));
groups = ng;
groups, &gsize) == -1);
if ((g = getgrgid(groups[i])) == NULL)
free(groups);
TAILQ_ENTRY(portal_group_s) groups; /* link to next group */
TAILQ_INSERT_TAIL(&target->group_list, curr, groups);
TAILQ_REMOVE(&target->group_list, curr, groups);
TAILQ_FOREACH(cgroup, &target->group_list, groups)
TAILQ_FOREACH(curr, &target->group_list, groups)
.groups = meson8b_cbus_groups,
.groups = meson8b_aobus_groups,
group = &sc->sc_conf->groups[n];
group = &sc->sc_conf->groups[n];
const char *groups;
groups = fdtbus_pinctrl_parse_groups(mux, &groups_len);
if (groups == NULL)
groups_len -= strlen(groups) + 1, groups += strlen(groups) + 1) {
meson_pinctrl_setfunc(sc, groups);
group = &sc->sc_conf->groups[n];
const struct meson_pinctrl_group *groups;
.groups = mesong12a_periphs_groups,
.groups = mesong12a_aobus_groups,
.groups = mesongxbb_periphs_groups,
.groups = mesongxbb_aobus_groups,
.groups = mesongxl_periphs_groups,
.groups = mesongxl_aobus_groups,
struct wpi_power_group *group = &sc->groups[n];
for (group = &sc->groups[1]; group < &sc->groups[4]; group++)
group = &sc->groups[0];
struct wpi_power_group groups[WPI_POWER_GROUPS_COUNT];
gid_t groups[NGROUPS];
groups[i] = kauth_cred_group(credp, i);
gid = (gid_t) umap_findid(groups[i],
groups[i] = gid;
groups[i] = NULLGROUP;
kauth_cred_setgroups(credp, groups, ngroups, -1, UIO_SYSSPACE);
rump_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups)
rv = kauth_cred_setgroups(cred, groups, ngroups, 0, UIO_SYSSPACE);
getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroups)
groups[0] = basegid;
groups[0] = basegid;
groups[1] = 0;
if ((groups = malloc((maxgroups + 1) * sizeof(gid_t))) == NULL)
free(groups);
if ((ngroups = getgroups(maxgroups, groups)) != 0) {
gid = groups[cnt];
gid_t *glist = groups;
if (glist != groups)
gid_t *glist = groups;
if (glist != groups)
static gid_t *groups;
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
gh->g_link = groups[h];
groups[h] = gh;
for (gh = groups[h], p = NULL; gh != NULL; p = gh, gh = gh->g_link)
groups[h] = gh->g_link;
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
for (gh = groups[h]; gh != NULL; gh = gh->g_link)
EXTERN struct grouphead *groups[HSHSIZE];/* Pointer to active groups */
for (gh = groups[hash(name)]; gh != NULL; gh = gh->g_link)
if (groups[i] != pgid)
groups[i] = gid;
if (setgroups(ngroups, groups) < 0)
gid_t *groups;
rval = alloc_groups(&ngroups, &groups, &ngroupsmax);
rval = addgid(groups, ngroups, ngroupsmax, newgid, makespace);
for (i = 0; i < ngroups && groups[i] != newgid; i++)
groups[i] = groups[i + 1];
rval = addgid(groups, ngroups, ngroupsmax, oldgid, makespace);
free_groups(groups);
gid_t *groups;
if (alloc_groups(&ngroups, &groups, &ngroupsmax) == ADDGRP_NOERROR) {
if (groups[i] == grp->gr_gid) {
free_groups(groups);
free_groups(groups);
free_groups(void *groups)
free(groups);
alloc_groups(int *ngroups, gid_t **groups, int *ngroupsmax)
*groups = malloc(*ngroupsmax * sizeof(**groups));
if (*groups == NULL)
*ngroups = getgroups(*ngroupsmax, *groups);
free_groups(*groups);
addgid(gid_t *groups, int ngroups, int ngroupsmax, gid_t gid, int makespace)
for (i = 0; i < ngroups && groups[i] != gid; i++)
groups[ngroups++] = gid;
static gid_t groups[NGROUPS];
ngroups = getgroups(NGROUPS, groups);
if (gid == groups[i])
append_group(char *user, int ngroups, const char **groups)
if ((grp = getgrnam(groups[i])) == NULL) {
groups[i], user);
groups[i] = "";
if ((groupc = strlen(groups[i])) == 0) {
strncmp(groups[i], buf, (unsigned) entc) == 0) {
"entry too long", groups[i]);
p = cur->groups;
tmp->next = cur->groups;
cur->groups = tmp;
new->groups = tmp;
struct grouplist *groups;
tmp = mcur->groups;