/freebsd-current/crypto/openssh/ |
H A D | groupaccess.c | 42 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 D | getgrouplist.c | 49 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 D | port-aix.c | 447 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 D | user.c | 49 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 D | openpam_cred.h | 47 int ngroups; member in struct:pam_saved_cred
|
H A D | openpam_restore_cred.c | 75 setgroups(scred->ngroups, scred->groups) < 0 ||
|
H A D | openpam_borrow_cred.c | 89 scred->ngroups = r;
|
/freebsd-current/lib/libc/gen/ |
H A D | initgroups.c | 45 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 D | sandbox.c | 81 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 D | pwgr.c | 105 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 D | authunix_prot.c | 63 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 D | procstat_cred.c | 48 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 D | regex.cpp | 104 /// \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 D | id.c | 262 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 D | bitmap.c | 90 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 D | spl-cred.c | 38 right = group_info->ngroups; 76 rc = gi->ngroups;
|
/freebsd-current/usr.sbin/chown/ |
H A D | chown.c | 250 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 D | netnamer.c | 146 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 D | print-igmp.c | 134 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 D | login_access.c | 181 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 D | lpc.c | 342 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 D | mac_cred.c | 268 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 D | menubox.c | 90 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 D | cap_grp.c | 613 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 D | bitmap.h | 141 /* ngroups. */ \ 167 size_t ngroups; member in struct:bitmap_info_s 185 for (i = 0; i < binfo->ngroups; i++) { 294 } while (i < binfo->ngroups);
|