Skip to content

Commit 5ec16a8

Browse files
androsadamsonTrond Myklebust
authored andcommitted
NFSv4.1 Use clientid management rpc_clnt for secinfo
As per RFC 3530 and RFC 5661 Security Considerations Commit 4edaa30 "NFS: Use "krb5i" to establish NFSv4 state whenever possible" uses the nfs_client cl_rpcclient for all clientid management operations. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent bc4b2a8 commit 5ec16a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/nfs/nfs4proc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5794,6 +5794,10 @@ int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
57945794
return err;
57955795
}
57965796

5797+
/**
5798+
* Use the state managment nfs_client cl_rpcclient, which uses krb5i (if
5799+
* possible) as per RFC3530bis and RFC5661 Security Considerations sections
5800+
*/
57975801
static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors)
57985802
{
57995803
int status;
@@ -5809,9 +5813,10 @@ static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct
58095813
.rpc_argp = &args,
58105814
.rpc_resp = &res,
58115815
};
5816+
struct rpc_clnt *clnt = NFS_SERVER(dir)->nfs_client->cl_rpcclient;
58125817

58135818
dprintk("NFS call secinfo %s\n", name->name);
5814-
status = nfs4_call_sync(NFS_SERVER(dir)->client, NFS_SERVER(dir), &msg, &args.seq_args, &res.seq_res, 0);
5819+
status = nfs4_call_sync(clnt, NFS_SERVER(dir), &msg, &args.seq_args, &res.seq_res, 0);
58155820
dprintk("NFS reply secinfo: %d\n", status);
58165821
return status;
58175822
}

0 commit comments

Comments
 (0)