NFSv4.1 Use clientid management rpc_clnt
Subsystems (2)
cover NFSv4.1 Use clientid management rpc_clnt
From: Andy Adamson <[email protected]>
Version 2 changes:
remove the fs_locations patch
add code comments as per review
Testing: SECINFO against a filer. Still need to test SECINFO_NO_NAME
Andy Adamson (2):
NFSv4.1 Use clientid management rpc_clnt for secinfo NFSv4.1 Use clientid management rpc_clnt for secinfo_no_name
fs/nfs/nfs4proc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 1/2 NFSv4.1 Use clientid management rpc_clnt for secinfo
From: Andy Adamson <[email protected]>
As per RFC 3530 and RFC 5661 Security Considerations
Commit 4edaa308 "NFS: Use "krb5i" to establish NFSv4 state whenever possible" uses the nfs_client cl_rpcclient for all clientid management operations.
--- fs/nfs/nfs4proc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/nfs/nfs4proc.c +6 -1
@@ -5794,6 +5794,10 @@ int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,return err; } +/** +* Use the state managment nfs_client cl_rpcclient, which uses krb5i (if +* possible) as per RFC3530bis and RFC5661 Security Considerations sections +*/ static int _nfs4_proc_secinfo (struct inode *dir,const struct qstr *name,struct nfs4_secinfo_flavors *flavors) {int status;
@@ -5809,9 +5813,10 @@ static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct .rpc_argp = &args, .rpc_resp = &res, }; +struct rpc_clnt *clnt =NFS_SERVER (dir)->nfs_client->cl_rpcclient;dprintk ("NFS call secinfo %s\n" , name->name); - status =nfs4_call_sync (NFS_SERVER (dir)->client,NFS_SERVER (dir), &msg, &args.seq_args, &res.seq_res,0 ); + status =nfs4_call_sync (clnt,NFS_SERVER (dir), &msg, &args.seq_args, &res.seq_res,0 );dprintk ("NFS reply secinfo: %d\n" , status);return status; }
Signature · 1 line
1.8.3.1
PATCH 2/2 NFSv4.1 Use clientid management rpc_clnt for secinfo_no_name
In reply to [email protected]From: Andy Adamson <[email protected]>
As per RFC 5661 Security Considerations
Commit 4edaa308 "NFS: Use "krb5i" to establish NFSv4 state whenever possible" uses the nfs_client cl_rpcclient for all clientid management operations.
--- fs/nfs/nfs4proc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/nfs/nfs4proc.c +6 -1
@@ -7090,6 +7090,10 @@ out:return status; } +/** +* Use the state managment nfs_client cl_rpcclient, which uses krb5i (if +* possible) as per RFC3530bis and RFC5661 Security Considerations sections +*/ static int _nfs41_proc_secinfo_no_name (struct nfs_server *server,struct nfs_fh *fhandle,struct nfs_fsinfo *info,struct nfs4_secinfo_flavors *flavors)
@@ -7105,7 +7109,8 @@ _nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle, .rpc_argp = &args, .rpc_resp = &res, }; -return nfs4_call_sync (server->client, server, &msg, &args.seq_args, &res.seq_res,0 ); +return nfs4_call_sync (server->nfs_client->cl_rpcclient, server, &msg, + &args.seq_args, &res.seq_res,0 ); } static int
Signature · 1 line
1.8.3.1