summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-05-15 00:07:13 +0400
committerJ. Bruce Fields <bfields@redhat.com>2013-07-02 01:23:06 +0400
commit0dc1531aca7fd1440918bd55844a054e9c29acad (patch)
tree3bed6a56a709b4781d8108f7a5b7546a6685fd09 /fs/nfsd
parent442340639194762df7e61e8aabae44a18896eca1 (diff)
downloadlinux-0dc1531aca7fd1440918bd55844a054e9c29acad.tar.xz
svcrpc: store gss mech in svc_cred
Store a pointer to the gss mechanism used in the rq_cred and cl_cred. This will make it easier to enforce SP4_MACH_CRED, which needs to compare the mechanism used on the exchange_id with that used on protected operations. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 72f0c4e9a942..109b43402e82 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1188,6 +1188,9 @@ static int copy_cred(struct svc_cred *target, struct svc_cred *source)
target->cr_gid = source->cr_gid;
target->cr_group_info = source->cr_group_info;
get_group_info(target->cr_group_info);
+ target->cr_gss_mech = source->cr_gss_mech;
+ if (source->cr_gss_mech)
+ gss_mech_get(source->cr_gss_mech);
return 0;
}