svn commit: r194394 - projects/ngroups/usr.sbin/mountd
Brooks Davis
brooks at FreeBSD.org
Wed Jun 17 20:26:22 UTC 2009
Author: brooks
Date: Wed Jun 17 20:26:21 2009
New Revision: 194394
URL: http://svn.freebsd.org/changeset/base/194394
Log:
We're filling in an xucred so use XU_NGROUPS instead of NGRPS.
Modified:
projects/ngroups/usr.sbin/mountd/mountd.c
Modified: projects/ngroups/usr.sbin/mountd/mountd.c
==============================================================================
--- projects/ngroups/usr.sbin/mountd/mountd.c Wed Jun 17 20:12:23 2009 (r194393)
+++ projects/ngroups/usr.sbin/mountd/mountd.c Wed Jun 17 20:26:21 2009 (r194394)
@@ -2644,7 +2644,7 @@ parsecred(namelist, cr)
char *names;
struct passwd *pw;
struct group *gr;
- gid_t groups[NGRPS + 1];
+ gid_t groups[XU_NGROUPS + 1];
int ngroups;
cr->cr_version = XUCRED_VERSION;
@@ -2672,7 +2672,7 @@ parsecred(namelist, cr)
return;
}
cr->cr_uid = pw->pw_uid;
- ngroups = NGRPS + 1;
+ ngroups = XU_NGROUPS + 1;
if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups))
syslog(LOG_ERR, "too many groups");
/*
@@ -2697,7 +2697,7 @@ parsecred(namelist, cr)
return;
}
cr->cr_ngroups = 0;
- while (names != NULL && *names != '\0' && cr->cr_ngroups < NGRPS) {
+ while (names != NULL && *names != '\0' && cr->cr_ngroups < XU_NGROUPS) {
name = strsep(&names, ":");
if (isdigit(*name) || *name == '-') {
cr->cr_groups[cr->cr_ngroups++] = atoi(name);
@@ -2709,7 +2709,7 @@ parsecred(namelist, cr)
cr->cr_groups[cr->cr_ngroups++] = gr->gr_gid;
}
}
- if (names != NULL && *names != '\0' && cr->cr_ngroups == NGRPS)
+ if (names != NULL && *names != '\0' && cr->cr_ngroups == XU_NGROUPS)
syslog(LOG_ERR, "too many groups");
}
More information about the svn-src-projects
mailing list