Searched refs:ngroups (Results 1 - 25 of 41) sorted by path

12

/freebsd-11-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-11-stable/contrib/jemalloc/include/jemalloc/internal/
H A Dbitmap.h109 size_t ngroups; member in struct:bitmap_info_s
145 for (i = 0; i < binfo->ngroups; i++) {
/freebsd-11-stable/contrib/jemalloc/src/
H A Dbitmap.c81 binfo->ngroups = BITMAP_BITS2GROUPS(nbits);
89 return (binfo->ngroups);
101 bitmap[binfo->ngroups - 1] >>= extra;
/freebsd-11-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-11-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-11-stable/contrib/pf/authpf/
H A Dauthpf.c504 int gl_init = 0, ngroups = NGROUPS + 1; local
541 pw->pw_gid, groups, &ngroups);
545 for ( cnt = 0; cnt < ngroups; cnt++) {
/freebsd-11-stable/contrib/pjdfstest/
H A Dpjdfstest.c1000 long ngroups; local
1004 ngroups = sysconf(_SC_NGROUPS_MAX);
1005 assert(ngroups > 0);
1006 gidset = malloc(sizeof(*gidset) * ngroups);
1010 if (i >= ngroups) {
/freebsd-11-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++) {
H A Dprint-pim.c146 int ngroups, njoin, nprune; local
195 ngroups = bp[3];
198 while (ngroups--) {
/freebsd-11-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 groups_byname = xcalloc(ngroups, sizeof(*groups_byname));
67 if (getgrouplist(user, base, groups_bygid, &ngroups) == -1)
69 for (i = 0, j = 0; i < ngroups; i++)
73 return (ngroups = j);
85 for (i = 0; i < ngroups;
[all...]
/freebsd-11-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.c436 int ret = 0, ngroups = 0, maxgroups; local
451 groups[ngroups++] = pgid;
456 if (ngroups >= maxgroups || l == LONG_MIN || l == LONG_MAX) {
463 groups[ngroups++] = gid;
467 *grpcnt = ngroups;
/freebsd-11-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-11-stable/lib/libc/rpc/
H A Dnetnamer.c150 gid_t ngroups = 0; local
160 if (ngroups == NGRPS) {
169 for (j = 0; j < ngroups; j++)
175 groups[ngroups++] = grp->gr_gid;
180 return (ngroups);
/freebsd-11-stable/lib/libcasper/services/cap_grp/
H A Dcap_grp.c613 unsigned int ngroups; local
615 for (ngroups = 0; grp->gr_mem[ngroups] != NULL; ngroups++) {
617 ngroups);
619 nvlist_add_string(nvl, nvlname, grp->gr_mem[ngroups]);
621 nvlist_add_number(nvl, "gr_nmem", (uint64_t)ngroups);
/freebsd-11-stable/lib/libcasper/services/cap_grp/tests/
H A Dgrp_test.c1206 size_t ngroups)
1220 for (i = 0; i < ngroups; i++) {
1226 if (i == ngroups)
1229 if (got != ngroups)
1239 for (i = 0; i < ngroups; i++) {
1245 if (i == ngroups)
1248 if (got != ngroups)
1251 for (i = 0; i < ngroups; i++) {
1257 for (i = 0; i < ngroups; i++) {
1263 for (i = 0; i < ngroups;
1205 runtest_groups(cap_channel_t *capgrp, const char **names, const gid_t *gids, size_t ngroups) argument
[all...]
/freebsd-11-stable/sys/dev/iwn/
H A Dif_iwnreg.h1171 uint8_t ngroups; member in struct:iwn_phy_calib
1178 uint8_t ngroups; member in struct:iwn5000_phy_calib_crystal
1188 uint8_t ngroups; member in struct:iwn5000_phy_calib_temp_offset
1199 uint8_t ngroups; member in struct:iwn5000_phy_calib_temp_offsetv2
1210 uint8_t ngroups; member in struct:iwn_phy_calib_gain
/freebsd-11-stable/sys/kern/
H A Dkern_prot.c1938 int ngroups; local
1944 ngroups = MIN(cr->cr_ngroups, XU_NGROUPS);
1945 xcr->cr_ngroups = ngroups;
1947 ngroups * sizeof(*cr->cr_groups));
/freebsd-11-stable/sys/rpc/
H A Dauthunix_prot.c67 uint32_t ngroups, i; local
104 ngroups = cred->cr_ngroups - 1;
105 if (ngroups > NGRPS)
106 ngroups = NGRPS;
109 if (!xdr_uint32_t(xdrs, &ngroups))
111 for (i = 0; i < ngroups; i++) {
122 if (ngroups + 1 > ngroups_max + 1)
125 cred->cr_ngroups = ngroups + 1;
/freebsd-11-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);
H A Dmac_framework.h117 int mac_cred_check_setgroups(struct ucred *cred, int ngroups,
H A Dmac_policy.h145 typedef int (*mpo_cred_check_setgroups_t)(struct ucred *cred, int ngroups,
/freebsd-11-stable/sys/security/mac_stub/
H A Dmac_stub.c247 stub_cred_check_setgroups(struct ucred *cred, int ngroups, argument
/freebsd-11-stable/sys/security/mac_test/
H A Dmac_test.c317 test_cred_check_setgroups(struct ucred *cred, int ngroups, argument
/freebsd-11-stable/usr.bin/id/
H A Did.c272 int cnt, ngroups; local
291 ngroups = ngroups_max;
292 getgrouplist(pw->pw_name, gid, groups, &ngroups);
295 ngroups = getgroups(ngroups_max, groups);
316 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) {
381 int cnt, id, lastid, ngroups; local
391 ngroups = ngroups_max;
392 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
394 ngroups = getgroups(ngroups_max, groups);
397 for (lastid = -1, cnt = 0; cnt < ngroups;
[all...]

Completed in 298 milliseconds

12