Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2009 20:26:21 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r194394 - projects/ngroups/usr.sbin/mountd
Message-ID:  <200906172026.n5HKQLA3087124@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906172026.n5HKQLA3087124>