Home
last modified time | relevance | path

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

123

/freebsd/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/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/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/sys/rpc/
H A Dauthunix_prot.c63 uint32_t ngroups, i; in xdr_authunix_parms() local
100 ngroups = cred->cr_ngroups - 1; in xdr_authunix_parms()
101 if (ngroups > NGRPS) in xdr_authunix_parms()
102 ngroups = NGRPS; in xdr_authunix_parms()
105 if (!xdr_uint32_t(xdrs, &ngroups)) in xdr_authunix_parms()
107 for (i = 0; i < ngroups; i++) { in xdr_authunix_parms()
118 if (ngroups + 1 > ngroups_max + 1) in xdr_authunix_parms()
121 cred->cr_ngroups = ngroups + 1; in xdr_authunix_parms()
/freebsd/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/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/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/lib/libc/gen/
H A Dinitgroups.c45 int ngroups, ret; in initgroups() local
57 ngroups = (int)ngroups_max; in initgroups()
58 getgrouplist(uname, agroup, groups, &ngroups); in initgroups()
59 ret = setgroups(ngroups, groups); in initgroups()
/freebsd/usr.bin/procstat/
H A Dprocstat_cred.c48 unsigned int i, ngroups; in procstat_cred() local
76 groups = procstat_getgroups(procstat, kipp, &ngroups); in procstat_cred()
78 ngroups = kipp->ki_ngroups; in procstat_cred()
82 for (i = 0; i < ngroups; i++) in procstat_cred()
/freebsd/usr.bin/id/
H A Did.c262 int cnt, ngroups; in id_print() local
281 ngroups = ngroups_max; in id_print()
282 getgrouplist(pw->pw_name, gid, groups, &ngroups); in id_print()
285 ngroups = getgroups(ngroups_max, groups); in id_print()
306 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) { in id_print()
371 int cnt, id, lastid, ngroups; in group() local
381 ngroups = ngroups_max; in group()
382 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); in group()
384 ngroups = getgroups(ngroups_max, groups); in group()
387 for (lastid = -1, cnt = 0; cnt < ngroups; ++cnt) { in group()
/freebsd/usr.sbin/chown/
H A Dchown.c250 static int ngroups = -1; in chownerr() local
262 if (gid != (gid_t)-1 && ngroups == -1 && in chownerr()
267 ngroups = getgroups(ngroups_max, groups); in chownerr()
268 while (--ngroups >= 0 && gid != groups[ngroups]); in chownerr()
270 if (ngroups < 0) { in chownerr()
/freebsd/lib/libc/rpc/
H A Dnetnamer.c146 gid_t ngroups = 0; in _getgroups() local
156 if (ngroups == NGRPS) { in _getgroups()
165 for (j = 0; j < ngroups; j++) in _getgroups()
171 groups[ngroups++] = grp->gr_gid; in _getgroups()
176 return (ngroups); in _getgroups()
/freebsd/contrib/tcpdump/
H A Dprint-igmp.c134 u_int group, nsrcs, ngroups; in print_igmpv3_report() local
142 ngroups = GET_BE_U_2(bp + 6); in print_igmpv3_report()
143 ND_PRINT(", %u group record(s)", ngroups); in print_igmpv3_report()
147 for (i=0; i<ngroups; i++) { in print_igmpv3_report()
/freebsd/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/lib/libpam/modules/pam_login_access/
H A Dlogin_access.c181 int i, ret, ngroups = NGROUPS; in group_match() local
193 if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) { in group_match()
198 if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0) in group_match()
200 for (i = 0; i < ngroups; i++) in group_match()
/freebsd/usr.sbin/lpr/lpc/
H A Dlpc.c342 static int ngroups = 0; in ingroup() local
356 ngroups = getgroups(ngroups_max, groups); in ingroup()
357 if (ngroups < 0) in ingroup()
361 for (i = 0; i < ngroups; i++) in ingroup()
/freebsd/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/lib/libcasper/services/cap_grp/
H A Dcap_grp.c613 unsigned int ngroups; in grp_pack() local
615 for (ngroups = 0; grp->gr_mem[ngroups] != NULL; ngroups++) { in grp_pack()
617 ngroups); in grp_pack()
619 nvlist_add_string(nvl, nvlname, grp->gr_mem[ngroups]); in grp_pack()
621 nvlist_add_number(nvl, "gr_nmem", (uint64_t)ngroups); in grp_pack()
/freebsd/contrib/bsddialog/lib/
H A Dmenubox.c90 enum menumode mode, unsigned int ngroups, in build_privatemenu() argument
101 CHECK_ARRAY(ngroups, groups); in build_privatemenu()
103 for (i = 0; i < (int)ngroups; i++) { in build_privatemenu()
114 for (i = 0; i < (int)ngroups; i++) { in build_privatemenu()
221 getfirst_with_default(int npritems, struct privateitem *pritems, int ngroups, in getfirst_with_default() argument
231 if (*focusgroup < 0 || *focusgroup >= ngroups) in getfirst_with_default()
503 unsigned int menurows, enum menumode mode, unsigned int ngroups, in do_mixedlist() argument
518 if (build_privatemenu(conf, &m, mode, ngroups, groups) != 0) in do_mixedlist()
529 m.sel = getfirst_with_default(m.nitems, m.pritems, ngroups, groups, in do_mixedlist()
697 int cols, unsigned int menurows, unsigned int ngroups, in bsddialog_mixedlist() argument
[all …]
/freebsd/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/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/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/usr.sbin/rpc.lockd/
H A Dkern.c234 int ngroups; in set_auth() local
236 ngroups = xucred->cr_ngroups - 1; in set_auth()
237 if (ngroups > NGRPS) in set_auth()
238 ngroups = NGRPS; in set_auth()
244 ngroups, in set_auth()
/freebsd/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