Skip to content

Commit

Permalink
NFSv4.1: Use the correct hostname in the client identifier string
Browse files Browse the repository at this point in the history
We need to use the hostname of the process that created the nfs_client.
That hostname is now stored in the rpc_client->cl_nodename.

Also remove the utsname()->domainname component. There is no reason
to include the NIS/YP domainname in a client identifier string.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Apr 30, 2012
1 parent cbbb344 commit 3617e50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5122,10 +5122,9 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
nfs4_construct_boot_verifier(clp, &verifier);

args.id_len = scnprintf(args.id, sizeof(args.id),
"%s/%s.%s/%u",
"%s/%s/%u",
clp->cl_ipaddr,
init_utsname()->nodename,
init_utsname()->domainname,
clp->cl_rpcclient->cl_nodename,
clp->cl_rpcclient->cl_auth->au_flavor);

res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL);
Expand Down

0 comments on commit 3617e50

Please sign in to comment.