aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth.c15
-rw-r--r--net/sunrpc/sunrpc_syms.c2
-rw-r--r--net/sunrpc/svc.c12
-rw-r--r--net/sunrpc/sysctl.c7
-rw-r--r--net/sunrpc/xprtsock.c9
5 files changed, 23 insertions, 22 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index a415d99c39..8c7756036e 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -299,11 +299,10 @@ put_rpccred(struct rpc_cred *cred)
299void 299void
300rpcauth_unbindcred(struct rpc_task *task) 300rpcauth_unbindcred(struct rpc_task *task)
301{ 301{
302 struct rpc_auth *auth = task->tk_auth;
303 struct rpc_cred *cred = task->tk_msg.rpc_cred; 302 struct rpc_cred *cred = task->tk_msg.rpc_cred;
304 303
305 dprintk("RPC: %4d releasing %s cred %p\n", 304 dprintk("RPC: %4d releasing %s cred %p\n",
306 task->tk_pid, auth->au_ops->au_name, cred); 305 task->tk_pid, task->tk_auth->au_ops->au_name, cred);
307 306
308 put_rpccred(cred); 307 put_rpccred(cred);
309 task->tk_msg.rpc_cred = NULL; 308 task->tk_msg.rpc_cred = NULL;
@@ -312,22 +311,22 @@ rpcauth_unbindcred(struct rpc_task *task)
312u32 * 311u32 *
313rpcauth_marshcred(struct rpc_task *task, u32 *p) 312rpcauth_marshcred(struct rpc_task *task, u32 *p)
314{ 313{
315 struct rpc_auth *auth = task->tk_auth;
316 struct rpc_cred *cred = task->tk_msg.rpc_cred; 314 struct rpc_cred *cred = task->tk_msg.rpc_cred;
317 315
318 dprintk("RPC: %4d marshaling %s cred %p\n", 316 dprintk("RPC: %4d marshaling %s cred %p\n",
319 task->tk_pid, auth->au_ops->au_name, cred); 317 task->tk_pid, task->tk_auth->au_ops->au_name, cred);
318
320 return cred->cr_ops->crmarshal(task, p); 319 return cred->cr_ops->crmarshal(task, p);
321} 320}
322 321
323u32 * 322u32 *
324rpcauth_checkverf(struct rpc_task *task, u32 *p) 323rpcauth_checkverf(struct rpc_task *task, u32 *p)
325{ 324{
326 struct rpc_auth *auth = task->tk_auth;
327 struct rpc_cred *cred = task->tk_msg.rpc_cred; 325 struct rpc_cred *cred = task->tk_msg.rpc_cred;
328 326
329 dprintk("RPC: %4d validating %s cred %p\n", 327 dprintk("RPC: %4d validating %s cred %p\n",
330 task->tk_pid, auth->au_ops->au_name, cred); 328 task->tk_pid, task->tk_auth->au_ops->au_name, cred);
329
331 return cred->cr_ops->crvalidate(task, p); 330 return cred->cr_ops->crvalidate(task, p);
332} 331}
333 332
@@ -363,12 +362,12 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
363int 362int
364rpcauth_refreshcred(struct rpc_task *task) 363rpcauth_refreshcred(struct rpc_task *task)
365{ 364{
366 struct rpc_auth *auth = task->tk_auth;
367 struct rpc_cred *cred = task->tk_msg.rpc_cred; 365 struct rpc_cred *cred = task->tk_msg.rpc_cred;
368 int err; 366 int err;
369 367
370 dprintk("RPC: %4d refreshing %s cred %p\n", 368 dprintk("RPC: %4d refreshing %s cred %p\n",
371 task->tk_pid, auth->au_ops->au_name, cred); 369 task->tk_pid, task->tk_auth->au_ops->au_name, cred);
370
372 err = cred->cr_ops->crrefresh(task); 371 err = cred->cr_ops->crrefresh(task);
373 if (err < 0) 372 if (err < 0)
374 task->tk_status = err; 373 task->tk_status = err;
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 2387e7b823..a03d4b600c 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -63,8 +63,6 @@ EXPORT_SYMBOL(rpc_mkpipe);
63/* Client transport */ 63/* Client transport */
64EXPORT_SYMBOL(xprt_create_proto); 64EXPORT_SYMBOL(xprt_create_proto);
65EXPORT_SYMBOL(xprt_set_timeout); 65EXPORT_SYMBOL(xprt_set_timeout);
66EXPORT_SYMBOL(xprt_udp_slot_table_entries);
67EXPORT_SYMBOL(xprt_tcp_slot_table_entries);
68 66
69/* Client credential cache */ 67/* Client credential cache */
70EXPORT_SYMBOL(rpcauth_register); 68EXPORT_SYMBOL(rpcauth_register);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index e9bd91265f..5a220b2bb3 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -313,6 +313,11 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp)
313 rqstp->rq_proc = proc = ntohl(svc_getu32(argv)); /* procedure number */ 313 rqstp->rq_proc = proc = ntohl(svc_getu32(argv)); /* procedure number */
314 314
315 progp = serv->sv_program; 315 progp = serv->sv_program;
316
317 for (progp = serv->sv_program; progp; progp = progp->pg_next)
318 if (prog == progp->pg_prog)
319 break;
320
316 /* 321 /*
317 * Decode auth data, and add verifier to reply buffer. 322 * Decode auth data, and add verifier to reply buffer.
318 * We do this before anything else in order to get a decent 323 * We do this before anything else in order to get a decent
@@ -320,7 +325,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp)
320 */ 325 */
321 auth_res = svc_authenticate(rqstp, &auth_stat); 326 auth_res = svc_authenticate(rqstp, &auth_stat);
322 /* Also give the program a chance to reject this call: */ 327 /* Also give the program a chance to reject this call: */
323 if (auth_res == SVC_OK) { 328 if (auth_res == SVC_OK && progp) {
324 auth_stat = rpc_autherr_badcred; 329 auth_stat = rpc_autherr_badcred;
325 auth_res = progp->pg_authenticate(rqstp); 330 auth_res = progp->pg_authenticate(rqstp);
326 } 331 }
@@ -340,10 +345,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp)
340 case SVC_COMPLETE: 345 case SVC_COMPLETE:
341 goto sendit; 346 goto sendit;
342 } 347 }
343 348
344 for (progp = serv->sv_program; progp; progp = progp->pg_next)
345 if (prog == progp->pg_prog)
346 break;
347 if (progp == NULL) 349 if (progp == NULL)
348 goto err_bad_prog; 350 goto err_bad_prog;
349 351
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index d0c9f460e4..1065904841 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -119,13 +119,6 @@ done:
119 return 0; 119 return 0;
120} 120}
121 121
122unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE;
123unsigned int xprt_tcp_slot_table_entries = RPC_DEF_SLOT_TABLE;
124unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
125EXPORT_SYMBOL(xprt_min_resvport);
126unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
127EXPORT_SYMBOL(xprt_max_resvport);
128
129 122
130static unsigned int min_slot_table_size = RPC_MIN_SLOT_TABLE; 123static unsigned int min_slot_table_size = RPC_MIN_SLOT_TABLE;
131static unsigned int max_slot_table_size = RPC_MAX_SLOT_TABLE; 124static unsigned int max_slot_table_size = RPC_MAX_SLOT_TABLE;
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 2e1529217e..0a51fd46a8 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -36,6 +36,15 @@
36#include <net/tcp.h> 36#include <net/tcp.h>
37 37
38/* 38/*
39 * xprtsock tunables
40 */
41unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE;
42unsigned int xprt_tcp_slot_table_entries = RPC_DEF_SLOT_TABLE;
43
44unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT;
45unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT;
46
47/*
39 * How many times to try sending a request on a socket before waiting 48 * How many times to try sending a request on a socket before waiting
40 * for the socket buffer to clear. 49 * for the socket buffer to clear.
41 */ 50 */