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

123

/freebsd-13-stable/crypto/openssh/
H A Dgroupaccess.c42 static int ngroups; variable
56 if (ngroups > 0)
59 ngroups = NGROUPS_MAX;
61 ngroups = MAX(NGROUPS_MAX, sysconf(_SC_NGROUPS_MAX));
64 groups_bygid = xcalloc(ngroups, sizeof(*groups_bygid));
65 while (getgrouplist(user, base, groups_bygid, &ngroups) == -1) {
68 groups_bygid = xreallocarray(groups_bygid, ngroups,
71 groups_byname = xcalloc(ngroups, sizeof(*groups_byname));
73 for (i = 0, j = 0; i < ngroups; i++)
77 return (ngroups
[all...]
/freebsd-13-stable/crypto/openssh/openbsd-compat/
H A Dgetgrouplist.c49 int i, ngroups; local
54 ngroups = 0;
60 if (ngroups >= maxgroups) {
61 *grpcnt = ngroups;
64 groups[ngroups++] = agroup;
73 for (bail = 0, i = 0; bail == 0 && i < ngroups; i++)
80 if (ngroups >= maxgroups) {
84 groups[ngroups++] = grp->gr_gid;
91 *grpcnt = ngroups;
H A Dport-aix.c444 int ret = 0, ngroups = 0, maxgroups; local
459 groups[ngroups++] = pgid;
464 if (ngroups >= maxgroups || l == LONG_MIN || l == LONG_MAX) {
471 groups[ngroups++] = gid;
475 *grpcnt = ngroups;
/freebsd-13-stable/contrib/atf/atf-c/detail/
H A Duser.c49 static int ngroups = -1; local
53 if (ngroups == -1) {
54 ngroups = getgroups(NGROUPS_MAX, groups);
55 INV(ngroups >= 0);
59 for (i = 0; !found && i < ngroups; i++)
/freebsd-13-stable/lib/libc/gen/
H A Dinitgroups.c49 int ngroups, ret; local
61 ngroups = (int)ngroups_max;
62 getgrouplist(uname, agroup, groups, &ngroups);
63 ret = setgroups(ngroups, groups);
/freebsd-13-stable/contrib/openpam/lib/libpam/
H A Dopenpam_cred.h49 int ngroups; member in struct:pam_saved_cred
H A Dopenpam_restore_cred.c77 setgroups(scred->ngroups, scred->groups) < 0 ||
H A Dopenpam_borrow_cred.c91 scred->ngroups = r;
/freebsd-13-stable/contrib/openbsm/bin/auditdistd/
H A Dsandbox.c81 int ngroups, ret; local
109 ngroups = sysconf(_SC_NGROUPS_MAX);
110 if (ngroups == -1) {
113 ngroups = NGROUPS_MAX;
115 ngroups++; /* For base gid. */
116 groups = malloc(sizeof(groups[0]) * ngroups);
119 ngroups);
122 if (getgrouplist(user, pw->pw_gid, groups, &ngroups) == -1) {
161 if (setgroups(ngroups, groups) == -1) {
209 PJDLOG_VERIFY(getgroups(0, NULL) == ngroups);
[all...]
/freebsd-13-stable/contrib/netbsd-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;
/freebsd-13-stable/sys/rpc/
H A Dauthunix_prot.c69 uint32_t ngroups, i; local
106 ngroups = cred->cr_ngroups - 1;
107 if (ngroups > NGRPS)
108 ngroups = NGRPS;
111 if (!xdr_uint32_t(xdrs, &ngroups))
113 for (i = 0; i < ngroups; i++) {
124 if (ngroups + 1 > ngroups_max + 1)
127 cred->cr_ngroups = ngroups + 1;
/freebsd-13-stable/usr.bin/procstat/
H A Dprocstat_cred.c51 unsigned int i, ngroups; local
79 groups = procstat_getgroups(procstat, kipp, &ngroups);
81 ngroups = kipp->ki_ngroups;
85 for (i = 0; i < ngroups; i++)
/freebsd-13-stable/contrib/kyua/utils/text/
H A Dregex.cpp104 /// \param ngroups Number of capture groups in the regex. This is an upper
109 const std::size_t ngroups) :
111 _nmatches(ngroups + 1),
213 /// \param ngroups Number of capture groups in the regular expression. This
219 impl(const std::string& regex_, const std::size_t ngroups,
221 _ngroups(ngroups)
255 /// \param ngroups Number of capture groups in the regular expression. This is
264 text::regex::compile(const std::string& regex_, const std::size_t ngroups,
267 return regex(std::shared_ptr< impl >(new impl(regex_, ngroups,
293 /// \param ngroups Numbe
108 impl(const ::regex_t* preg, const std::string& str, const std::size_t ngroups) argument
[all...]
/freebsd-13-stable/usr.bin/id/
H A Did.c274 int cnt, ngroups; local
293 ngroups = ngroups_max;
294 getgrouplist(pw->pw_name, gid, groups, &ngroups);
297 ngroups = getgroups(ngroups_max, groups);
318 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) {
383 int cnt, id, lastid, ngroups; local
393 ngroups = ngroups_max;
394 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
396 ngroups = getgroups(ngroups_max, groups);
399 for (lastid = -1, cnt = 0; cnt < ngroups;
[all...]
/freebsd-13-stable/contrib/jemalloc/src/
H A Dbitmap.c90 binfo->ngroups = BITMAP_BITS2GROUPS(nbits);
96 return binfo->ngroups;
112 bitmap[binfo->ngroups - 1] >>= extra;
/freebsd-13-stable/usr.sbin/chown/
H A Dchown.c265 static int ngroups = -1; local
277 if (gid != (gid_t)-1 && ngroups == -1 &&
282 ngroups = getgroups(ngroups_max, groups);
283 while (--ngroups >= 0 && gid != groups[ngroups]);
285 if (ngroups < 0) {
/freebsd-13-stable/lib/libc/rpc/
H A Dnetnamer.c152 gid_t ngroups = 0; local
162 if (ngroups == NGRPS) {
171 for (j = 0; j < ngroups; j++)
177 groups[ngroups++] = grp->gr_gid;
182 return (ngroups);
/freebsd-13-stable/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-cred.c38 right = group_info->ngroups;
76 rc = gi->ngroups;
/freebsd-13-stable/contrib/tcpdump/
H A Dprint-igmp.c153 u_int group, nsrcs, ngroups; local
162 ngroups = EXTRACT_16BITS(&bp[6]);
163 ND_PRINT((ndo, ", %d group record(s)", ngroups));
167 for (i=0; i<ngroups; i++) {
/freebsd-13-stable/lib/libpam/modules/pam_login_access/
H A Dlogin_access.c184 int i, ret, ngroups = NGROUPS; local
196 if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) {
201 if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0)
203 for (i = 0; i < ngroups; i++)
/freebsd-13-stable/usr.sbin/lpr/lpc/
H A Dlpc.c356 static int ngroups = 0; local
370 ngroups = getgroups(ngroups_max, groups);
371 if (ngroups < 0)
375 for (i = 0; i < ngroups; i++)
/freebsd-13-stable/sys/security/mac/
H A Dmac_cred.c270 mac_cred_check_setgroups(struct ucred *cred, int ngroups, gid_t *gidset) argument
274 MAC_POLICY_CHECK_NOSLEEP(cred_check_setgroups, cred, ngroups, gidset);
275 MAC_CHECK_PROBE3(cred_check_setgroups, error, cred, ngroups, gidset);
/freebsd-13-stable/lib/libcasper/services/cap_grp/
H A Dcap_grp.c615 unsigned int ngroups; local
617 for (ngroups = 0; grp->gr_mem[ngroups] != NULL; ngroups++) {
619 ngroups);
621 nvlist_add_string(nvl, nvlname, grp->gr_mem[ngroups]);
623 nvlist_add_number(nvl, "gr_nmem", (uint64_t)ngroups);
/freebsd-13-stable/contrib/jemalloc/include/jemalloc/internal/
H A Dbitmap.h141 /* ngroups. */ \
167 size_t ngroups; member in struct:bitmap_info_s
185 for (i = 0; i < binfo->ngroups; i++) {
294 } while (i < binfo->ngroups);
/freebsd-13-stable/lib/libcasper/services/cap_grp/tests/
H A Dgrp_test.c1213 size_t ngroups)
1227 for (i = 0; i < ngroups; i++) {
1233 if (i == ngroups)
1236 if (got != ngroups)
1246 for (i = 0; i < ngroups; i++) {
1252 if (i == ngroups)
1255 if (got != ngroups)
1258 for (i = 0; i < ngroups; i++) {
1264 for (i = 0; i < ngroups; i++) {
1270 for (i = 0; i < ngroups;
1212 runtest_groups(cap_channel_t *capgrp, const char **names, const gid_t *gids, size_t ngroups) argument
[all...]

Completed in 200 milliseconds

123