aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2005-11-17 12:19:19 +0000
committerHartmut Brandt <harti@FreeBSD.org>2005-11-17 12:19:19 +0000
commit251bb62d63a7d92cc1db3fcfc42116869c0611df (patch)
tree09ef840c8ff36f332f376ede7f3140f7472b78ad
parentc3f2a836ad5da90aff0ea87f72abd48231f5118e (diff)
Notes
-rw-r--r--usr.sbin/rpc.lockd/kern.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/rpc.lockd/kern.c b/usr.sbin/rpc.lockd/kern.c
index ef5d268dafe3d..c7473f680ee11 100644
--- a/usr.sbin/rpc.lockd/kern.c
+++ b/usr.sbin/rpc.lockd/kern.c
@@ -231,12 +231,17 @@ set_auth(cl, xucred)
CLIENT *cl;
struct xucred *xucred;
{
+ int ngroups;
+
+ ngroups = xucred->cr_ngroups - 1;
+ if (ngroups > NGRPS)
+ ngroups = NGRPS;
if (cl->cl_auth != NULL)
cl->cl_auth->ah_ops->ah_destroy(cl->cl_auth);
cl->cl_auth = authunix_create(hostname,
xucred->cr_uid,
xucred->cr_groups[0],
- xucred->cr_ngroups - 1,
+ ngroups,
&xucred->cr_groups[1]);
}