Searched refs:ngroups (Results 1 - 25 of 63) sorted by relevance

123

/netbsd-current/external/bsd/atf/dist/atf-c/detail/
H A Duser.c52 static int ngroups = -1; local
56 if (ngroups == -1) {
57 ngroups = getgroups(NGROUPS_MAX, groups);
58 INV(ngroups >= 0);
62 for (i = 0; !found && i < ngroups; i++)
/netbsd-current/crypto/external/bsd/openssh/dist/
H A Dgroupaccess.c43 static int ngroups; variable
57 if (ngroups > 0)
60 ngroups = sizeof(groups_bygid) / sizeof(gid_t);
61 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1)
63 for (i = 0, j = 0; i < ngroups; i++)
66 return (ngroups = j);
78 for (i = 0; i < ngroups; i++)
94 for (i = 0; i < ngroups; i++) {
116 if (ngroups > 0) {
117 for (i = 0; i < ngroups;
[all...]
/netbsd-current/external/bsd/openpam/dist/lib/libpam/
H A Dopenpam_cred.h49 int ngroups; member in struct:pam_saved_cred
H A Dopenpam_restore_cred.c80 setgroups(scred->ngroups, scred->groups) < 0 ||
H A Dopenpam_borrow_cred.c94 scred->ngroups = r;
/netbsd-current/lib/libc/gen/
H A Dinitgroups.c58 int ngroups; local
64 ngroups = NGROUPS;
65 if (getgrouplist(uname, agroup, groups, &ngroups) == -1) {
66 int maxgroups = ngroups;
70 if (getgrouplist(uname, agroup, groups, &ngroups) == -1)
71 ngroups = maxgroups;
73 rval = setgroups(ngroups, groups);
76 if (ng > 0 && ng < ngroups)
/netbsd-current/tests/usr.bin/id/
H A Dpwgr.c105 getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroups) argument
110 if (*ngroups >= 1) {
115 ret = (*ngroups >= cnt) ? 0 : -1;
116 *ngroups = cnt;
118 if (*ngroups >= 1) {
123 if (*ngroups >= 2) {
128 ret = (*ngroups >= cnt) ? 0 : -1;
129 *ngroups = cnt;
/netbsd-current/external/bsd/atf/dist/tools/
H A Duser.cpp76 static int ngroups = -1; local
80 if (ngroups == -1) {
81 ngroups = getgroups(NGROUPS_MAX, groups);
82 assert(ngroups >= 0);
86 for (i = 0; !found && i < ngroups; i++)
/netbsd-current/usr.bin/newgrp/
H A Dgrutil.c69 alloc_groups(int *ngroups, gid_t **groups, int *ngroupsmax) argument
79 *ngroups = getgroups(*ngroupsmax, *groups);
80 if (*ngroups == -1) {
88 addgid(gid_t *groups, int ngroups, int ngroupsmax, gid_t gid, int makespace) argument
93 for (i = 0; i < ngroups && groups[i] != gid; i++)
97 if (i == ngroups) {
98 if (ngroups < ngroupsmax)
99 groups[ngroups++] = gid;
102 * if ngroups > nmaxgroups. If makespace is
131 if (setgroups(ngroups, group
140 int ngroups, ngroupsmax; local
213 int ngroups, ngroupsmax; local
[all...]
/netbsd-current/usr.bin/id/
H A Did.c223 int cnt, ngroups; local
244 if ((ngroups = getgroups(maxgroups, groups)) != 0) {
245 for (fmt = " groups=%ju", lastid = -1, cnt = 0; cnt < ngroups;
263 int cnt, id, lastid, ngroups; local
271 ngroups = maxgroups + 1;
272 if (getgrouplist(pw->pw_name, pw->pw_gid, glist, &ngroups) == -1) {
273 glist = malloc(ngroups * sizeof(gid_t));
274 (void) getgrouplist(pw->pw_name, pw->pw_gid, glist, &ngroups);
276 for (fmt = " groups=%u", lastid = -1, cnt = 0; cnt < ngroups;
294 int cnt, ngroups; local
[all...]
/netbsd-current/distrib/utils/libhack/
H A Dgetgrent.c215 int maxgroups, i, ngroups, ret; local
219 ngroups = 0;
224 if (ngroups < maxgroups)
225 groups[ngroups] = agroup;
228 ngroups++;
241 for (i = 0; i < MIN(ngroups, maxgroups); i++) {
245 if (ngroups < maxgroups)
246 groups[ngroups] = grp->gr_gid;
249 ngroups++;
254 *grpcnt = ngroups;
[all...]
/netbsd-current/external/bsd/libbind/dist/irs/
H A Dutil.c69 gid_t basegid, gid_t *groups, int *ngroups)
77 maxgroups = *ngroups;
107 *ngroups = ng;
68 make_group_list(struct irs_gr *this, const char *name, gid_t basegid, gid_t *groups, int *ngroups) argument
H A Dgetgrent.c112 return (getgrouplist_p(name, basegid, groups, ngroups, net_data));
191 getgrouplist_p(const char *name, gid_t basegid, gid_t *groups, int *ngroups, argument
196 *ngroups = 0;
199 return ((*gr->list)(gr, name, basegid, groups, ngroups));
H A Dgen_gr.c235 gid_t basegid, gid_t *groups, int *ngroups)
244 maxgroups = *ngroups;
245 *ngroups = 0;
257 if (newgid(*ngroups, groups, t_groups[n])) {
258 if (*ngroups == maxgroups) {
262 groups[(*ngroups)++] = t_groups[n];
486 newgid(int ngroups, gid_t *groups, gid_t group) { argument
487 ngroups--, groups++;
488 for (; ngroups-- > 0; groups++)
234 gr_list(struct irs_gr *this, const char *name, gid_t basegid, gid_t *groups, int *ngroups) argument
/netbsd-current/sys/miscfs/umapfs/
H A Dumap_subr.c141 uint16_t ngroups; local
176 ngroups = kauth_cred_ngroups(credp);
177 for (i = 0; i < ngroups; i++) {
188 kauth_cred_setgroups(credp, groups, ngroups, -1, UIO_SYSSPACE);
/netbsd-current/usr.bin/quota/
H A Dquota.c113 int ngroups; local
166 ngroups = getgroups(NGROUPS, gidset);
167 if (ngroups < 0)
170 for (i = 0; i < ngroups; i++)
258 int ngroups; local
268 ngroups = getgroups(NGROUPS, gidset);
269 if (ngroups < 0) {
274 for (i = 0; i < ngroups; i++)
277 if (i >= ngroups && myuid != 0) {
292 int ngroups; local
[all...]
/netbsd-current/external/bsd/jemalloc/dist/src/
H A Dbitmap.c90 binfo->ngroups = BITMAP_BITS2GROUPS(nbits);
96 return binfo->ngroups;
112 bitmap[binfo->ngroups - 1] >>= extra;
/netbsd-current/sys/arch/arm/amlogic/
H A Dmeson_pinctrl.h76 u_int ngroups; member in struct:meson_pinctrl_config
/netbsd-current/sys/rump/librump/rumpkern/
H A Daccessors.c103 rump_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups) argument
116 rv = kauth_cred_setgroups(cred, groups, ngroups, 0, UIO_SYSSPACE);
/netbsd-current/sys/miscfs/procfs/
H A Dprocfs_status.c104 uint16_t ngroups; local
124 ngroups = kauth_cred_ngroups(cr);
126 for (i = 0; i < ngroups; i++)
191 ngroups = kauth_cred_ngroups(cr);
192 for (i = 0; i < ngroups; i++)
212 uint16_t ngroups; local
227 ngroups = kauth_cred_ngroups(cr);
229 for (i = 0; i < ngroups; i++)
/netbsd-current/usr.sbin/lpr/lpc/
H A Dlpc.c323 static int ngroups; local
333 ngroups = getgroups(NGROUPS, groups);
334 if (ngroups < 0)
338 for (i = 0; i < ngroups; i++)
/netbsd-current/external/bsd/tcpdump/dist/
H A Dprint-igmp.c140 u_int group, nsrcs, ngroups; local
148 ngroups = GET_BE_U_2(bp + 6);
149 ND_PRINT(", %u group record(s)", ngroups);
153 for (i=0; i<ngroups; i++) {
/netbsd-current/external/gpl2/xcvs/dist/src/
H A Dfilesubr.c196 int i, ngroups; local
201 ngroups = getgroups(0, NULL);
202 if (ngroups == -1)
205 if ((gidp = malloc(sizeof(gid_t) * ngroups)) == NULL)
208 if (getgroups(ngroups, gidp) == -1) {
213 for (i = 0; i < ngroups; i++)
218 return i != ngroups;
/netbsd-current/sys/compat/linux/common/
H A Dlinux_uid16.c280 unsigned int i, ngroups = SCARG(uap, gidsetsize); local
282 if (ngroups > COMPAT_NGROUPS16)
284 error = copyin(SCARG(uap, gidset), lset, ngroups);
288 for (i = 0; i < ngroups; i++)
/netbsd-current/external/gpl3/gcc/dist/libquadmath/printf/
H A Dprintf_fp.c125 wchar_t thousands_sep, int ngroups);
805 int ngroups = 0;
870 ngroups = guess_grouping (intdig_max, grouping);
873 chars_needed += ngroups + 1;
1082 ngroups = guess_grouping (intdig_no, grouping);
1086 ngroups);
1183 + ngroups * thousands_sep_len);
1283 const char *grouping, wchar_t thousands_sep, int ngroups)
1287 if (ngroups == 0)
1291 memmove (buf + intdig_no + ngroups, bu
803 int ngroups = 0; local
1279 group_number(wchar_t *buf, wchar_t *bufend, unsigned int intdig_no, const char *grouping, wchar_t thousands_sep, int ngroups) argument
[all...]

Completed in 356 milliseconds

123