From owner-svn-src-all@FreeBSD.ORG Sat Jun 20 00:54:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 795C0106566C; Sat, 20 Jun 2009 00:54:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 676348FC13; Sat, 20 Jun 2009 00:54:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5K0svJd060185; Sat, 20 Jun 2009 00:54:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5K0svPK060182; Sat, 20 Jun 2009 00:54:57 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200906200054.n5K0svPK060182@svn.freebsd.org> From: Rick Macklem Date: Sat, 20 Jun 2009 00:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194523 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2009 00:54:57 -0000 Author: rmacklem Date: Sat Jun 20 00:54:57 2009 New Revision: 194523 URL: http://svn.freebsd.org/changeset/base/194523 Log: Change the size of the nfsc_groups[] array in the experimental nfs client to RPCAUTH_UNIXGIDS + 1 (17), since that is what can go on the wire for AUTH_SYS authentication. Reviewed by: brooks Approved by: kib (mentor) Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfsclient/nfs_clport.c Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Sat Jun 20 00:04:48 2009 (r194522) +++ head/sys/fs/nfs/nfs.h Sat Jun 20 00:54:57 2009 (r194523) @@ -404,13 +404,13 @@ typedef struct { (b)->bits[1] = NFSATTRBIT_REFERRAL1; } while (0) /* - * Store uid, gid creds that handle maps to. - * Since some BSDen define cr_gid as cr_groups[0], I'll just keep them - * all in nfsc_groups[NGROUPS + 1]. + * Store uid, gid creds that were used when the stateid was acquired. + * The RPC layer allows RPCAUTH_UNIXGIDS + 1 groups to go out on the wire, + * so that's how many gets stored here. */ struct nfscred { uid_t nfsc_uid; - gid_t nfsc_groups[NGROUPS + 1]; + gid_t nfsc_groups[RPCAUTH_UNIXGIDS + 1]; int nfsc_ngroups; }; Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sat Jun 20 00:04:48 2009 (r194522) +++ head/sys/fs/nfsclient/nfs_clport.c Sat Jun 20 00:54:57 2009 (r194523) @@ -979,7 +979,7 @@ newnfs_copyincred(struct ucred *cr, stru int i; nfscr->nfsc_uid = cr->cr_uid; - nfscr->nfsc_ngroups = MIN(cr->cr_ngroups, XU_NGROUPS); + nfscr->nfsc_ngroups = MIN(cr->cr_ngroups, RPCAUTH_UNIXGIDS + 1); for (i = 0; i < nfscr->nfsc_ngroups; i++) nfscr->nfsc_groups[i] = cr->cr_groups[i]; }