aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2014-06-21 20:52:17 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-07-12 18:41:25 -0400
commitf11b2a1cfbf5dd783eb55cb470509d06e20d1c78 (patch)
tree3e7ecb73670953ef7067551582dd3c432736a86c /fs/nfs/client.c
parenta0337d1ddb5a4bd609e3ff0955551cb240340340 (diff)
nfs4: copy acceptor name from context to nfs_client
The current CB_COMPOUND handling code tries to compare the principal name of the request with the cl_hostname in the client. This is not guaranteed to ever work, particularly if the client happened to mount a CNAME of the server or a non-fqdn. Fix this by instead comparing the cr_principal string with the acceptor name that we get from gssd. In the event that gssd didn't send one down (i.e. it was too old), then we fall back to trying to use the cl_hostname as we do today. Signed-off-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index b213ee8fb012..168aa0df2658 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -252,6 +252,7 @@ void nfs_free_client(struct nfs_client *clp)
252 put_net(clp->cl_net); 252 put_net(clp->cl_net);
253 put_nfs_version(clp->cl_nfs_mod); 253 put_nfs_version(clp->cl_nfs_mod);
254 kfree(clp->cl_hostname); 254 kfree(clp->cl_hostname);
255 kfree(clp->cl_acceptor);
255 kfree(clp); 256 kfree(clp);
256 257
257 dprintk("<-- nfs_free_client()\n"); 258 dprintk("<-- nfs_free_client()\n");