diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-03 03:55:26 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:47 -0500 |
commit | 286d7d6a0cb38d3d4316a1dfea9b0c0fc5a6455b (patch) | |
tree | 844ea8a14db8261a3977ae4d460e227402a4a426 /fs/nfs/nfs4proc.c | |
parent | b4454fe1a7cb76a248d0641c9d68a44a1b8d9a1f (diff) |
NFSv4: Remove requirement for machine creds for the "setclientid" operation
Use a cred from the nfs4_client->cl_state_owners list.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e38401931291..b3349154994b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2846,7 +2846,7 @@ int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct | |||
2846 | return nfs4_map_errors(ret); | 2846 | return nfs4_map_errors(ret); |
2847 | } | 2847 | } |
2848 | 2848 | ||
2849 | int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short port) | 2849 | int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short port, struct rpc_cred *cred) |
2850 | { | 2850 | { |
2851 | nfs4_verifier sc_verifier; | 2851 | nfs4_verifier sc_verifier; |
2852 | struct nfs4_setclientid setclientid = { | 2852 | struct nfs4_setclientid setclientid = { |
@@ -2857,7 +2857,7 @@ int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short p | |||
2857 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID], | 2857 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID], |
2858 | .rpc_argp = &setclientid, | 2858 | .rpc_argp = &setclientid, |
2859 | .rpc_resp = clp, | 2859 | .rpc_resp = clp, |
2860 | .rpc_cred = clp->cl_cred, | 2860 | .rpc_cred = cred, |
2861 | }; | 2861 | }; |
2862 | u32 *p; | 2862 | u32 *p; |
2863 | int loop = 0; | 2863 | int loop = 0; |
@@ -2871,7 +2871,7 @@ int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short p | |||
2871 | setclientid.sc_name_len = scnprintf(setclientid.sc_name, | 2871 | setclientid.sc_name_len = scnprintf(setclientid.sc_name, |
2872 | sizeof(setclientid.sc_name), "%s/%u.%u.%u.%u %s %u", | 2872 | sizeof(setclientid.sc_name), "%s/%u.%u.%u.%u %s %u", |
2873 | clp->cl_ipaddr, NIPQUAD(clp->cl_addr.s_addr), | 2873 | clp->cl_ipaddr, NIPQUAD(clp->cl_addr.s_addr), |
2874 | clp->cl_cred->cr_ops->cr_name, | 2874 | cred->cr_ops->cr_name, |
2875 | clp->cl_id_uniquifier); | 2875 | clp->cl_id_uniquifier); |
2876 | setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, | 2876 | setclientid.sc_netid_len = scnprintf(setclientid.sc_netid, |
2877 | sizeof(setclientid.sc_netid), "tcp"); | 2877 | sizeof(setclientid.sc_netid), "tcp"); |
@@ -2894,14 +2894,14 @@ int nfs4_proc_setclientid(struct nfs4_client *clp, u32 program, unsigned short p | |||
2894 | } | 2894 | } |
2895 | 2895 | ||
2896 | int | 2896 | int |
2897 | nfs4_proc_setclientid_confirm(struct nfs4_client *clp) | 2897 | nfs4_proc_setclientid_confirm(struct nfs4_client *clp, struct rpc_cred *cred) |
2898 | { | 2898 | { |
2899 | struct nfs_fsinfo fsinfo; | 2899 | struct nfs_fsinfo fsinfo; |
2900 | struct rpc_message msg = { | 2900 | struct rpc_message msg = { |
2901 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID_CONFIRM], | 2901 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETCLIENTID_CONFIRM], |
2902 | .rpc_argp = clp, | 2902 | .rpc_argp = clp, |
2903 | .rpc_resp = &fsinfo, | 2903 | .rpc_resp = &fsinfo, |
2904 | .rpc_cred = clp->cl_cred, | 2904 | .rpc_cred = cred, |
2905 | }; | 2905 | }; |
2906 | unsigned long now; | 2906 | unsigned long now; |
2907 | int status; | 2907 | int status; |