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)
This commit is contained in:
parent
045de71424
commit
2c1e6cce5b
@ -404,13 +404,13 @@ typedef struct {
|
|||||||
(b)->bits[1] = NFSATTRBIT_REFERRAL1; } while (0)
|
(b)->bits[1] = NFSATTRBIT_REFERRAL1; } while (0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store uid, gid creds that handle maps to.
|
* Store uid, gid creds that were used when the stateid was acquired.
|
||||||
* Since some BSDen define cr_gid as cr_groups[0], I'll just keep them
|
* The RPC layer allows RPCAUTH_UNIXGIDS + 1 groups to go out on the wire,
|
||||||
* all in nfsc_groups[NGROUPS + 1].
|
* so that's how many gets stored here.
|
||||||
*/
|
*/
|
||||||
struct nfscred {
|
struct nfscred {
|
||||||
uid_t nfsc_uid;
|
uid_t nfsc_uid;
|
||||||
gid_t nfsc_groups[NGROUPS + 1];
|
gid_t nfsc_groups[RPCAUTH_UNIXGIDS + 1];
|
||||||
int nfsc_ngroups;
|
int nfsc_ngroups;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -979,7 +979,7 @@ newnfs_copyincred(struct ucred *cr, struct nfscred *nfscr)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
nfscr->nfsc_uid = cr->cr_uid;
|
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++)
|
for (i = 0; i < nfscr->nfsc_ngroups; i++)
|
||||||
nfscr->nfsc_groups[i] = cr->cr_groups[i];
|
nfscr->nfsc_groups[i] = cr->cr_groups[i];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user