Increase group limit for kerberized NFSv4

PR:	202659
Submitted by:	matthew.l.dailey@dartmouth.edu
Reviewed by:	rmacklem dfr
MFC after:	1 week
Sponsored by:	iXsystems
This commit is contained in:
Josh Paetzel 2015-09-26 16:30:16 +00:00
parent 0d27967e31
commit 5eff3ec6e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288272
2 changed files with 4 additions and 7 deletions

View File

@ -121,9 +121,6 @@ enum svc_rpc_gss_client_state {
};
#define SVC_RPC_GSS_SEQWINDOW 128
#ifndef RPCAUTH_UNIXGIDS
#define RPCAUTH_UNIXGIDS 16
#endif
struct svc_rpc_gss_clientid {
unsigned long ci_hostid;
@ -150,7 +147,7 @@ struct svc_rpc_gss_client {
int cl_rpcflavor; /* RPC pseudo sec flavor */
bool_t cl_done_callback; /* TRUE after call */
void *cl_cookie; /* user cookie from callback */
gid_t cl_gid_storage[RPCAUTH_UNIXGIDS];
gid_t cl_gid_storage[NGROUPS];
gss_OID cl_mech; /* mechanism */
gss_qop_t cl_qop; /* quality of protection */
uint32_t cl_seqlast; /* sequence window origin */
@ -776,7 +773,7 @@ svc_rpc_gss_build_ucred(struct svc_rpc_gss_client *client,
uc->gid = 65534;
uc->gidlist = client->cl_gid_storage;
numgroups = RPCAUTH_UNIXGIDS;
numgroups = NGROUPS;
maj_stat = gss_pname_to_unix_cred(&min_stat, name, client->cl_mech,
&uc->uid, &uc->gid, &numgroups, &uc->gidlist[0]);
if (GSS_ERROR(maj_stat))

View File

@ -751,8 +751,8 @@ gssd_pname_to_uid_1_svc(pname_to_uid_args *argp, pname_to_uid_res *result, struc
buflen_hint = buflen;
}
if (pw) {
int len = NGRPS;
int groups[NGRPS];
int len = NGROUPS;
int groups[NGROUPS];
result->gid = pw->pw_gid;
getgrouplist(pw->pw_name, pw->pw_gid,
groups, &len);