Home
last modified time | relevance | path

Searched refs:ngroups (Results 1 – 25 of 60) sorted by relevance

123

/freebsd-14.2/crypto/openssh/
H A Dgroupaccess.c42 static int ngroups; variable
56 if (ngroups > 0) in ga_init()
59 ngroups = NGROUPS_MAX; in ga_init()
68 groups_bygid = xreallocarray(groups_bygid, ngroups, in ga_init()
73 for (i = 0, j = 0; i < ngroups; i++) in ga_init()
77 return (ngroups = j); in ga_init()
89 for (i = 0; i < ngroups; i++) in ga_match()
105 for (i = 0; i < ngroups; i++) { in ga_match_pattern_list()
127 if (ngroups > 0) { in ga_free()
128 for (i = 0; i < ngroups; i++) in ga_free()
[all …]
/freebsd-14.2/contrib/openbsm/bin/auditdistd/
H A Dsandbox.c81 int ngroups, ret; in sandbox() local
109 ngroups = sysconf(_SC_NGROUPS_MAX); in sandbox()
110 if (ngroups == -1) { in sandbox()
113 ngroups = NGROUPS_MAX; in sandbox()
115 ngroups++; /* For base gid. */ in sandbox()
116 groups = malloc(sizeof(groups[0]) * ngroups); in sandbox()
119 ngroups); in sandbox()
161 if (setgroups(ngroups, groups) == -1) { in sandbox()
209 PJDLOG_VERIFY(getgroups(0, NULL) == ngroups); in sandbox()
213 ngroups); in sandbox()
[all …]
/freebsd-14.2/crypto/openssh/openbsd-compat/
H A Dgetgrouplist.c49 int i, ngroups; in getgrouplist() local
54 ngroups = 0; in getgrouplist()
60 if (ngroups >= maxgroups) { in getgrouplist()
61 *grpcnt = ngroups; in getgrouplist()
64 groups[ngroups++] = agroup; in getgrouplist()
73 for (bail = 0, i = 0; bail == 0 && i < ngroups; i++) in getgrouplist()
80 if (ngroups >= maxgroups) { in getgrouplist()
84 groups[ngroups++] = grp->gr_gid; in getgrouplist()
91 *grpcnt = ngroups; in getgrouplist()
H A Dport-aix.c447 int ret = 0, ngroups = 0, maxgroups; in getgrouplist() local
462 groups[ngroups++] = pgid; in getgrouplist()
467 if (ngroups >= maxgroups || ll < 0 || ll > UID_MAX) { in getgrouplist()
474 groups[ngroups++] = gid; in getgrouplist()
478 *grpcnt = ngroups; in getgrouplist()
/freebsd-14.2/sys/rpc/
H A Dauthunix_prot.c67 uint32_t ngroups, i; in xdr_authunix_parms() local
104 ngroups = cred->cr_ngroups - 1; in xdr_authunix_parms()
105 if (ngroups > NGRPS) in xdr_authunix_parms()
106 ngroups = NGRPS; in xdr_authunix_parms()
109 if (!xdr_uint32_t(xdrs, &ngroups)) in xdr_authunix_parms()
111 for (i = 0; i < ngroups; i++) { in xdr_authunix_parms()
122 if (ngroups + 1 > ngroups_max + 1) in xdr_authunix_parms()
125 cred->cr_ngroups = ngroups + 1; in xdr_authunix_parms()
/freebsd-14.2/contrib/netbsd-tests/usr.bin/id/
H A Dpwgr.c105 getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroups) in getgrouplist() argument
110 if (*ngroups >= 1) { in getgrouplist()
115 ret = (*ngroups >= cnt) ? 0 : -1; in getgrouplist()
116 *ngroups = cnt; in getgrouplist()
118 if (*ngroups >= 1) { in getgrouplist()
123 if (*ngroups >= 2) { in getgrouplist()
128 ret = (*ngroups >= cnt) ? 0 : -1; in getgrouplist()
129 *ngroups = cnt; in getgrouplist()
/freebsd-14.2/contrib/atf/atf-c/detail/
H A Duser.c49 static int ngroups = -1; in atf_user_is_member_of_group() local
53 if (ngroups == -1) { in atf_user_is_member_of_group()
54 ngroups = getgroups(NGROUPS_MAX, groups); in atf_user_is_member_of_group()
55 INV(ngroups >= 0); in atf_user_is_member_of_group()
59 for (i = 0; !found && i < ngroups; i++) in atf_user_is_member_of_group()
/freebsd-14.2/contrib/kyua/utils/text/
H A Dregex.cpp109 const std::size_t ngroups) : in impl()
111 _nmatches(ngroups + 1), in impl()
219 impl(const std::string& regex_, const std::size_t ngroups, in impl()
221 _ngroups(ngroups) in impl()
264 text::regex::compile(const std::string& regex_, const std::size_t ngroups, in compile() argument
267 return regex(std::shared_ptr< impl >(new impl(regex_, ngroups, in compile()
299 const std::size_t ngroups, const bool ignore_case) in match_regex() argument
301 return regex::compile(regex_, ngroups, ignore_case).match(str); in match_regex()
/freebsd-14.2/lib/libc/gen/
H A Dinitgroups.c47 int ngroups, ret; in initgroups() local
59 ngroups = (int)ngroups_max; in initgroups()
60 getgrouplist(uname, agroup, groups, &ngroups); in initgroups()
61 ret = setgroups(ngroups, groups); in initgroups()
/freebsd-14.2/usr.bin/procstat/
H A Dprocstat_cred.c49 unsigned int i, ngroups; in procstat_cred() local
77 groups = procstat_getgroups(procstat, kipp, &ngroups); in procstat_cred()
79 ngroups = kipp->ki_ngroups; in procstat_cred()
83 for (i = 0; i < ngroups; i++) in procstat_cred()
/freebsd-14.2/usr.bin/id/
H A Did.c274 int cnt, ngroups; in id_print() local
293 ngroups = ngroups_max; in id_print()
294 getgrouplist(pw->pw_name, gid, groups, &ngroups); in id_print()
297 ngroups = getgroups(ngroups_max, groups); in id_print()
318 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) { in id_print()
383 int cnt, id, lastid, ngroups; in group() local
393 ngroups = ngroups_max; in group()
394 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); in group()
396 ngroups = getgroups(ngroups_max, groups); in group()
399 for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) { in group()
/freebsd-14.2/usr.sbin/chown/
H A Dchown.c263 static int ngroups = -1; in chownerr() local
275 if (gid != (gid_t)-1 && ngroups == -1 && in chownerr()
280 ngroups = getgroups(ngroups_max, groups); in chownerr()
281 while (--ngroups >= 0 && gid != groups[ngroups]); in chownerr()
283 if (ngroups < 0) { in chownerr()
/freebsd-14.2/lib/libc/rpc/
H A Dnetnamer.c149 gid_t ngroups = 0; in _getgroups() local
159 if (ngroups == NGRPS) { in _getgroups()
168 for (j = 0; j < ngroups; j++) in _getgroups()
174 groups[ngroups++] = grp->gr_gid; in _getgroups()
179 return (ngroups); in _getgroups()
/freebsd-14.2/contrib/tcpdump/
H A Dprint-igmp.c132 u_int group, nsrcs, ngroups; in print_igmpv3_report() local
140 ngroups = GET_BE_U_2(bp + 6); in print_igmpv3_report()
141 ND_PRINT(", %u group record(s)", ngroups); in print_igmpv3_report()
145 for (i=0; i<ngroups; i++) { in print_igmpv3_report()
/freebsd-14.2/contrib/bsddialog/lib/
H A Dmenubox.c71 set_on_output(struct bsddialog_conf *conf, int output, int ngroups, in set_on_output() argument
79 for(i = abs = 0; i < ngroups; i++) { in set_on_output()
129 if (*focusgroup < 0 || *focusgroup >= ngroups) in getfirst_with_default()
450 for (i = 0; i < (int)ngroups; i++) { in do_mixedlist()
512 for (i = 0; i < (int)ngroups; i++) { in do_mixedlist()
571 set_on_output(conf, retval, ngroups, groups, pritems); in do_mixedlist()
579 set_on_output(conf, retval, ngroups, groups, in do_mixedlist()
696 set_on_output(conf, retval, ngroups, groups, in do_mixedlist()
723 set_on_output(conf, retval, ngroups, in do_mixedlist()
768 int cols, unsigned int menurows, unsigned int ngroups, in bsddialog_mixedlist() argument
[all …]
/freebsd-14.2/contrib/jemalloc/src/
H A Dbitmap.c90 binfo->ngroups = BITMAP_BITS2GROUPS(nbits); in bitmap_info_init()
96 return binfo->ngroups; in bitmap_info_ngroups()
112 bitmap[binfo->ngroups - 1] >>= extra; in bitmap_init()
/freebsd-14.2/lib/libpam/modules/pam_login_access/
H A Dlogin_access.c182 int i, ret, ngroups = NGROUPS; in group_match() local
194 if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) { in group_match()
199 if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0) in group_match()
201 for (i = 0; i < ngroups; i++) in group_match()
/freebsd-14.2/usr.sbin/lpr/lpc/
H A Dlpc.c354 static int ngroups = 0; in ingroup() local
368 ngroups = getgroups(ngroups_max, groups); in ingroup()
369 if (ngroups < 0) in ingroup()
373 for (i = 0; i < ngroups; i++) in ingroup()
/freebsd-14.2/sys/security/mac/
H A Dmac_cred.c268 mac_cred_check_setgroups(struct ucred *cred, int ngroups, gid_t *gidset) in mac_cred_check_setgroups() argument
272 MAC_POLICY_CHECK_NOSLEEP(cred_check_setgroups, cred, ngroups, gidset); in mac_cred_check_setgroups()
273 MAC_CHECK_PROBE3(cred_check_setgroups, error, cred, ngroups, gidset); in mac_cred_check_setgroups()
/freebsd-14.2/lib/libcasper/services/cap_grp/
H A Dcap_grp.c612 unsigned int ngroups; in grp_pack() local
614 for (ngroups = 0; grp->gr_mem[ngroups] != NULL; ngroups++) { in grp_pack()
616 ngroups); in grp_pack()
618 nvlist_add_string(nvl, nvlname, grp->gr_mem[ngroups]); in grp_pack()
620 nvlist_add_number(nvl, "gr_nmem", (uint64_t)ngroups); in grp_pack()
/freebsd-14.2/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-cred.c38 right = group_info->ngroups; in cr_groups_search()
76 rc = gi->ngroups; in crgetngroups()
/freebsd-14.2/sys/dev/nctgpio/
H A Dnctgpio.c148 int ngroups; member
154 .ngroups = 5,
221 .ngroups = 2,
252 .ngroups = 2,
283 .ngroups = 2,
315 .ngroups = 10,
444 .ngroups = 6,
523 .ngroups = 9,
638 .ngroups = 9,
1185 for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { in nct_attach()
[all …]
/freebsd-14.2/lib/libcasper/services/cap_grp/tests/
H A Dgrp_test.c1210 size_t ngroups) in runtest_groups() argument
1224 for (i = 0; i < ngroups; i++) { in runtest_groups()
1230 if (i == ngroups) in runtest_groups()
1233 if (got != ngroups) in runtest_groups()
1243 for (i = 0; i < ngroups; i++) { in runtest_groups()
1249 if (i == ngroups) in runtest_groups()
1252 if (got != ngroups) in runtest_groups()
1255 for (i = 0; i < ngroups; i++) { in runtest_groups()
1261 for (i = 0; i < ngroups; i++) { in runtest_groups()
1267 for (i = 0; i < ngroups; i++) { in runtest_groups()
[all …]
/freebsd-14.2/usr.sbin/rpc.lockd/
H A Dkern.c235 int ngroups; in set_auth() local
237 ngroups = xucred->cr_ngroups - 1; in set_auth()
238 if (ngroups > NGRPS) in set_auth()
239 ngroups = NGRPS; in set_auth()
245 ngroups, in set_auth()
/freebsd-14.2/sys/dev/p2sb/
H A Dlewisburg_gpiocm.c73 int ngroups; member
107 for (i = 0; i < sc->community->ngroups; ++i) in lbggpiocm_get_group()
320 sc->community->ngroups = i; in lbggpiocm_attach()

123