/freebsd-10.0-release/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 | 436 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-10.0-release/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 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-10.0-release/contrib/atf/atf-c/detail/ |
H A D | user.c | 52 static int ngroups = -1; local 56 if (ngroups == -1) { 57 ngroups = getgroups(NGROUPS_MAX, groups); 58 INV(ngroups >= 0); 62 for (i = 0; !found && i < ngroups; i++)
|
/freebsd-10.0-release/contrib/openpam/lib/libpam/ |
H A D | openpam_cred.h | 49 int ngroups; member in struct:pam_saved_cred
|
H A D | openpam_restore_cred.c | 77 setgroups(scred->ngroups, scred->groups) < 0 ||
|
H A D | openpam_borrow_cred.c | 91 scred->ngroups = r;
|
/freebsd-10.0-release/lib/libc/gen/ |
H A D | initgroups.c | 51 int ngroups, ret; local 63 ngroups = (int)ngroups_max; 64 getgrouplist(uname, agroup, groups, &ngroups); 65 ret = setgroups(ngroups, groups);
|
/freebsd-10.0-release/contrib/openbsm/bin/auditdistd/ |
H A D | sandbox.c | 83 int ngroups, ret; local 111 ngroups = sysconf(_SC_NGROUPS_MAX); 112 if (ngroups == -1) { 115 ngroups = NGROUPS_MAX; 117 ngroups++; /* For base gid. */ 118 groups = malloc(sizeof(groups[0]) * ngroups); 121 ngroups); 124 if (getgrouplist(user, pw->pw_gid, groups, &ngroups) == -1) { 163 if (setgroups(ngroups, groups) == -1) { 211 PJDLOG_VERIFY(getgroups(0, NULL) == ngroups); [all...] |
/freebsd-10.0-release/sys/rpc/ |
H A D | authunix_prot.c | 68 uint32_t ngroups, i; local 105 ngroups = cred->cr_ngroups - 1; 106 if (ngroups > NGRPS) 107 ngroups = NGRPS; 110 if (!xdr_uint32_t(xdrs, &ngroups)) 112 for (i = 0; i < ngroups; i++) { 123 if (ngroups + 1 > ngroups_max + 1) 126 cred->cr_ngroups = ngroups + 1;
|
/freebsd-10.0-release/usr.bin/procstat/ |
H A D | procstat_cred.c | 47 unsigned int i, ngroups; local 74 groups = procstat_getgroups(procstat, kipp, &ngroups); 76 ngroups = kipp->ki_ngroups; 79 for (i = 0; i < ngroups; i++)
|
/freebsd-10.0-release/usr.sbin/jexec/ |
H A D | jexec.c | 62 ngroups = ngroups_max; \ 63 if (getgrouplist(username, pwd->pw_gid, groups, &ngroups) != 0) \ 74 int ch, ngroups, uflag, Uflag; local 119 if (setgroups(ngroups, groups) != 0)
|
/freebsd-10.0-release/usr.bin/id/ |
H A D | id.c | 271 int cnt, ngroups; local 290 ngroups = ngroups_max; 291 getgrouplist(pw->pw_name, gid, groups, &ngroups); 294 ngroups = getgroups(ngroups_max, groups); 315 for (lastgid = -1, cnt = 0; cnt < ngroups; ++cnt) { 380 int cnt, id, lastid, ngroups; local 390 ngroups = ngroups_max; 391 (void) getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); 393 ngroups = getgroups(ngroups_max, groups); 396 for (lastid = -1, cnt = 0; cnt < ngroups; [all...] |
/freebsd-10.0-release/usr.sbin/chown/ |
H A D | chown.c | 274 static int ngroups = -1; local 286 if (gid != (gid_t)-1 && ngroups == -1 && 291 ngroups = getgroups(ngroups_max, groups); 292 while (--ngroups >= 0 && gid != groups[ngroups]); 294 if (ngroups < 0) {
|
/freebsd-10.0-release/lib/libc/rpc/ |
H A D | netnamer.c | 158 gid_t ngroups = 0; local 168 if (ngroups == NGRPS) { 177 for (j = 0; j < ngroups; j++) 183 groups[ngroups++] = grp->gr_gid; 188 return (ngroups);
|
/freebsd-10.0-release/contrib/tcpdump/ |
H A D | print-igmp.c | 156 u_int group, nsrcs, ngroups; local 165 ngroups = EXTRACT_16BITS(&bp[6]); 166 (void)printf(", %d group record(s)", ngroups); 170 for (i=0; i<ngroups; i++) {
|
H A D | print-pim.c | 126 int maddrlen, addrlen, ngroups, njoin, nprune; local 169 ngroups = bp[3]; 172 while (ngroups--) {
|
H A D | print-icmp6.c | 845 u_int group, nsrcs, ngroups; local 855 ngroups = EXTRACT_16BITS(&icp->icmp6_data16[1]); 856 printf(", %d group record(s)", ngroups); 860 for (i = 0; i < ngroups; i++) {
|
/freebsd-10.0-release/usr.sbin/lpr/lpc/ |
H A D | lpc.c | 354 static int ngroups = 0; local 368 ngroups = getgroups(ngroups_max, groups); 369 if (ngroups < 0) 373 for (i = 0; i < ngroups; i++)
|
/freebsd-10.0-release/sys/security/mac/ |
H A D | mac_cred.c | 271 mac_cred_check_setgroups(struct ucred *cred, int ngroups, gid_t *gidset) argument 275 MAC_POLICY_CHECK_NOSLEEP(cred_check_setgroups, cred, ngroups, gidset); 276 MAC_CHECK_PROBE3(cred_check_setgroups, error, cred, ngroups, gidset);
|
/freebsd-10.0-release/usr.sbin/rpc.lockd/ |
H A D | kern.c | 238 int ngroups; local 240 ngroups = xucred->cr_ngroups - 1; 241 if (ngroups > NGRPS) 242 ngroups = NGRPS; 248 ngroups,
|
/freebsd-10.0-release/usr.bin/quota/ |
H A D | quota.c | 113 int ngroups; local 156 ngroups = getgroups(NGROUPS, gidset); 157 if (ngroups < 0) 160 for (i = 0; i < ngroups; i++)
|
/freebsd-10.0-release/sys/fs/ext2fs/ |
H A D | ext2_vfsops.c | 772 int i, ngroups; local 790 for (i = 0, ngroups = 0; i < fs->e2fs_gcount; i++) { 792 ngroups++; 795 ngroups = fs->e2fs_gcount; 801 overhead += ngroups * (1 /* superblock */ + ngdb);
|
/freebsd-10.0-release/tools/regression/pjdfstest/ |
H A D | pjdfstest.c | 992 long ngroups; local 996 ngroups = sysconf(_SC_NGROUPS_MAX); 997 assert(ngroups > 0); 998 gidset = malloc(sizeof(*gidset) * ngroups); 1002 if (i >= ngroups) {
|
/freebsd-10.0-release/contrib/pf/authpf/ |
H A D | authpf.c | 504 int gl_init = 0, ngroups = NGROUPS + 1; local 541 pw->pw_gid, groups, &ngroups); 545 for ( cnt = 0; cnt < ngroups; cnt++) {
|