diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-05-14 22:06:49 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-05-31 20:29:58 -0400 |
commit | d5497fc693a446ce9100fcf4117c3f795ddfd0d2 (patch) | |
tree | 7254a8eb06629de6c9ac4b8dbe8e38c79c979af3 /fs/nfsd/nfs4state.c | |
parent | 8fbba96e5b327665265ad02b7f331b68536828bf (diff) |
nfsd4: move rq_flavor into svc_cred
Move the rq_flavor into struct svc_cred, and use it in setclientid and
exchange_id comparisons as well.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 6dc0cfb37541..c743cdf51ebc 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1177,6 +1177,7 @@ static int copy_cred(struct svc_cred *target, struct svc_cred *source) | |||
1177 | return -ENOMEM; | 1177 | return -ENOMEM; |
1178 | } else | 1178 | } else |
1179 | target->cr_principal = NULL; | 1179 | target->cr_principal = NULL; |
1180 | target->cr_flavor = source->cr_flavor; | ||
1180 | target->cr_uid = source->cr_uid; | 1181 | target->cr_uid = source->cr_uid; |
1181 | target->cr_gid = source->cr_gid; | 1182 | target->cr_gid = source->cr_gid; |
1182 | target->cr_group_info = source->cr_group_info; | 1183 | target->cr_group_info = source->cr_group_info; |
@@ -1213,11 +1214,11 @@ static bool groups_equal(struct group_info *g1, struct group_info *g2) | |||
1213 | return true; | 1214 | return true; |
1214 | } | 1215 | } |
1215 | 1216 | ||
1216 | /* XXX what about NGROUP */ | ||
1217 | static int | 1217 | static int |
1218 | same_creds(struct svc_cred *cr1, struct svc_cred *cr2) | 1218 | same_creds(struct svc_cred *cr1, struct svc_cred *cr2) |
1219 | { | 1219 | { |
1220 | if ((cr1->cr_uid != cr2->cr_uid) | 1220 | if ((cr1->cr_flavor != cr2->cr_flavor) |
1221 | || (cr1->cr_uid != cr2->cr_uid) | ||
1221 | || (cr1->cr_gid != cr2->cr_gid) | 1222 | || (cr1->cr_gid != cr2->cr_gid) |
1222 | || !groups_equal(cr1->cr_group_info, cr2->cr_group_info)) | 1223 | || !groups_equal(cr1->cr_group_info, cr2->cr_group_info)) |
1223 | return false; | 1224 | return false; |
@@ -1299,7 +1300,6 @@ static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir, | |||
1299 | rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table"); | 1300 | rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table"); |
1300 | copy_verf(clp, verf); | 1301 | copy_verf(clp, verf); |
1301 | rpc_copy_addr((struct sockaddr *) &clp->cl_addr, sa); | 1302 | rpc_copy_addr((struct sockaddr *) &clp->cl_addr, sa); |
1302 | clp->cl_flavor = rqstp->rq_flavor; | ||
1303 | gen_confirm(clp); | 1303 | gen_confirm(clp); |
1304 | clp->cl_cb_session = NULL; | 1304 | clp->cl_cb_session = NULL; |
1305 | return clp; | 1305 | return clp; |