summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-06-20 00:54:57 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-06-20 00:54:57 +0000
commit40e33db11b25c0e3d473f8f8fbfaa1fbc6c30a8f (patch)
tree0f861fa2dc126567119edab337094cf9949c65b8 /sys/fs
parent5bbf1e21517ad8739fe410118f1267a25238c20a (diff)
downloadFreeBSD-src-40e33db11b25c0e3d473f8f8fbfaa1fbc6c30a8f.zip
FreeBSD-src-40e33db11b25c0e3d473f8f8fbfaa1fbc6c30a8f.tar.gz
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)
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfs/nfs.h8
-rw-r--r--sys/fs/nfsclient/nfs_clport.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/fs/nfs/nfs.h b/sys/fs/nfs/nfs.h
index 0160af2..d02c754 100644
--- a/sys/fs/nfs/nfs.h
+++ b/sys/fs/nfs/nfs.h
@@ -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;
};
diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c
index 5b747c7..6453bcf7 100644
--- a/sys/fs/nfsclient/nfs_clport.c
+++ b/sys/fs/nfsclient/nfs_clport.c
@@ -979,7 +979,7 @@ newnfs_copyincred(struct ucred *cr, struct nfscred *nfscr)
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];
}
OpenPOWER on IntegriCloud