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

123

/freebsd-current/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-current/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.c447 int ret = 0, ngroups = 0, maxgroups; local
462 groups[ngroups++] = pgid;
467 if (ngroups >= maxgroups || ll < 0 || ll > UID_MAX) {
474 groups[ngroups++] = gid;
478 *grpcnt = ngroups;
/freebsd-current/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-current/contrib/openpam/lib/libpam/
H A Dopenpam_cred.h47 int ngroups; member in struct:pam_saved_cred
H A Dopenpam_restore_cred.c75 setgroups(scred->ngroups, scred->groups) < 0 ||
H A Dopenpam_borrow_cred.c89 scred->ngroups = r;
/freebsd-current/lib/libc/gen/
H A Dinitgroups.c45 int ngroups, ret; local
57 ngroups = (int)ngroups_max;
58 getgrouplist(uname, agroup, groups, &ngroups);
59 ret = setgroups(ngroups, groups);
/freebsd-current/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-current/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-current/sys/rpc/
H A Dauthunix_prot.c63 uint32_t ngroups, i; local
100 ngroups = cred->cr_ngroups - 1;
101 if (ngroups > NGRPS)
102 ngroups = NGRPS;
105 if (!xdr_uint32_t(xdrs, &ngroups))
107 for (i = 0; i < ngroups; i++) {
118 if (ngroups + 1 > ngroups_max + 1)
121 cred->cr_ngroups = ngroups + 1;
/freebsd-current/usr.bin/procstat/
H A Dprocstat_cred.c48 unsigned int i, ngroups; local
76 groups = procstat_getgroups(procstat, kipp, &ngroups);
78 ngroups = kipp->ki_ngroups;
82 for (i = 0; i < ngroups; i++)
/freebsd-current/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-current/usr.bin/id/
H A Did.c262 int cnt, ngroups; local
281 ngroups = ngroups_max;
282 getgrouplist(pw->pw_name, gid, groups, &ngroups);
285 ngroups = getgroups(ngroups_max, groups);
306 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) {
371 int cnt, id, lastid, ngroups; local
381 ngroups = ngroups_max;
382 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
384 ngroups = getgroups(ngroups_max, groups);
387 for (lastid = -1, cnt = 0; cnt < ngroups;
[all...]
/freebsd-current/contrib/jemalloc/src/
H A Dbitmap.c90 binfo->ngroups = BITMAP_BITS2GROUPS(nbits);
96 return binfo->ngroups;
112 bitmap[binfo->ngroups - 1] >>= extra;
/freebsd-current/sys/contrib/openzfs/module/os/linux/spl/
H A Dspl-cred.c38 right = group_info->ngroups;
76 rc = gi->ngroups;
/freebsd-current/usr.sbin/chown/
H A Dchown.c250 static int ngroups = -1; local
262 if (gid != (gid_t)-1 && ngroups == -1 &&
267 ngroups = getgroups(ngroups_max, groups);
268 while (--ngroups >= 0 && gid != groups[ngroups]);
270 if (ngroups < 0) {
/freebsd-current/lib/libc/rpc/
H A Dnetnamer.c146 gid_t ngroups = 0; local
156 if (ngroups == NGRPS) {
165 for (j = 0; j < ngroups; j++)
171 groups[ngroups++] = grp->gr_gid;
176 return (ngroups);
/freebsd-current/contrib/tcpdump/
H A Dprint-igmp.c134 u_int group, nsrcs, ngroups; local
142 ngroups = GET_BE_U_2(bp + 6);
143 ND_PRINT(", %u group record(s)", ngroups);
147 for (i=0; i<ngroups; i++) {
/freebsd-current/lib/libpam/modules/pam_login_access/
H A Dlogin_access.c181 int i, ret, ngroups = NGROUPS; local
193 if ((grouplist = calloc(ngroups, sizeof(gid_t))) == NULL) {
198 if (getgrouplist(username, passwd->pw_gid, grouplist, &ngroups) != 0)
200 for (i = 0; i < ngroups; i++)
/freebsd-current/usr.sbin/lpr/lpc/
H A Dlpc.c342 static int ngroups = 0; local
356 ngroups = getgroups(ngroups_max, groups);
357 if (ngroups < 0)
361 for (i = 0; i < ngroups; i++)
/freebsd-current/sys/security/mac/
H A Dmac_cred.c268 mac_cred_check_setgroups(struct ucred *cred, int ngroups, gid_t *gidset) argument
272 MAC_POLICY_CHECK_NOSLEEP(cred_check_setgroups, cred, ngroups, gidset);
273 MAC_CHECK_PROBE3(cred_check_setgroups, error, cred, ngroups, gidset);
/freebsd-current/contrib/bsddialog/lib/
H A Dmenubox.c90 enum menumode mode, unsigned int ngroups,
101 CHECK_ARRAY(ngroups, groups);
103 for (i = 0; i < (int)ngroups; i++) {
114 for (i = 0; i < (int)ngroups; i++) {
221 getfirst_with_default(int npritems, struct privateitem *pritems, int ngroups, argument
231 if (*focusgroup < 0 || *focusgroup >= ngroups)
503 unsigned int menurows, enum menumode mode, unsigned int ngroups,
518 if (build_privatemenu(conf, &m, mode, ngroups, groups) != 0)
529 m.sel = getfirst_with_default(m.nitems, m.pritems, ngroups, groups,
697 int cols, unsigned int menurows, unsigned int ngroups,
89 build_privatemenu(struct bsddialog_conf *conf, struct privatemenu *m, enum menumode mode, unsigned int ngroups, struct bsddialog_menugroup *groups) argument
502 do_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols, unsigned int menurows, enum menumode mode, unsigned int ngroups, struct bsddialog_menugroup *groups, int *focuslist, int *focusitem) argument
696 bsddialog_mixedlist(struct bsddialog_conf *conf, const char *text, int rows, int cols, unsigned int menurows, unsigned int ngroups, struct bsddialog_menugroup *groups, int *focuslist, int *focusitem) argument
[all...]
/freebsd-current/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-current/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);

Completed in 224 milliseconds

123