diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth.c | 25 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 4 | ||||
-rw-r--r-- | net/sunrpc/auth_unix.c | 2 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 2 |
4 files changed, 17 insertions, 16 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 81f4c776c558..74baf87ccff9 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -371,7 +371,7 @@ EXPORT_SYMBOL(rpcauth_init_cred); | |||
371 | struct rpc_cred * | 371 | struct rpc_cred * |
372 | rpcauth_bindcred(struct rpc_task *task) | 372 | rpcauth_bindcred(struct rpc_task *task) |
373 | { | 373 | { |
374 | struct rpc_auth *auth = task->tk_auth; | 374 | struct rpc_auth *auth = task->tk_client->cl_auth; |
375 | struct auth_cred acred = { | 375 | struct auth_cred acred = { |
376 | .uid = current->fsuid, | 376 | .uid = current->fsuid, |
377 | .gid = current->fsgid, | 377 | .gid = current->fsgid, |
@@ -381,7 +381,7 @@ rpcauth_bindcred(struct rpc_task *task) | |||
381 | int flags = 0; | 381 | int flags = 0; |
382 | 382 | ||
383 | dprintk("RPC: %5u looking up %s cred\n", | 383 | dprintk("RPC: %5u looking up %s cred\n", |
384 | task->tk_pid, task->tk_auth->au_ops->au_name); | 384 | task->tk_pid, task->tk_client->cl_auth->au_ops->au_name); |
385 | get_group_info(acred.group_info); | 385 | get_group_info(acred.group_info); |
386 | if (task->tk_flags & RPC_TASK_ROOTCREDS) | 386 | if (task->tk_flags & RPC_TASK_ROOTCREDS) |
387 | flags |= RPCAUTH_LOOKUP_ROOTCREDS; | 387 | flags |= RPCAUTH_LOOKUP_ROOTCREDS; |
@@ -397,11 +397,12 @@ rpcauth_bindcred(struct rpc_task *task) | |||
397 | void | 397 | void |
398 | rpcauth_holdcred(struct rpc_task *task) | 398 | rpcauth_holdcred(struct rpc_task *task) |
399 | { | 399 | { |
400 | dprintk("RPC: %5u holding %s cred %p\n", | 400 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
401 | task->tk_pid, task->tk_auth->au_ops->au_name, | 401 | if (cred != NULL) { |
402 | task->tk_msg.rpc_cred); | 402 | get_rpccred(cred); |
403 | if (task->tk_msg.rpc_cred) | 403 | dprintk("RPC: %5u holding %s cred %p\n", task->tk_pid, |
404 | get_rpccred(task->tk_msg.rpc_cred); | 404 | cred->cr_auth->au_ops->au_name, cred); |
405 | } | ||
405 | } | 406 | } |
406 | 407 | ||
407 | void | 408 | void |
@@ -441,7 +442,7 @@ rpcauth_unbindcred(struct rpc_task *task) | |||
441 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 442 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
442 | 443 | ||
443 | dprintk("RPC: %5u releasing %s cred %p\n", | 444 | dprintk("RPC: %5u releasing %s cred %p\n", |
444 | task->tk_pid, task->tk_auth->au_ops->au_name, cred); | 445 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
445 | 446 | ||
446 | put_rpccred(cred); | 447 | put_rpccred(cred); |
447 | task->tk_msg.rpc_cred = NULL; | 448 | task->tk_msg.rpc_cred = NULL; |
@@ -453,7 +454,7 @@ rpcauth_marshcred(struct rpc_task *task, __be32 *p) | |||
453 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 454 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
454 | 455 | ||
455 | dprintk("RPC: %5u marshaling %s cred %p\n", | 456 | dprintk("RPC: %5u marshaling %s cred %p\n", |
456 | task->tk_pid, task->tk_auth->au_ops->au_name, cred); | 457 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
457 | 458 | ||
458 | return cred->cr_ops->crmarshal(task, p); | 459 | return cred->cr_ops->crmarshal(task, p); |
459 | } | 460 | } |
@@ -464,7 +465,7 @@ rpcauth_checkverf(struct rpc_task *task, __be32 *p) | |||
464 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 465 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
465 | 466 | ||
466 | dprintk("RPC: %5u validating %s cred %p\n", | 467 | dprintk("RPC: %5u validating %s cred %p\n", |
467 | task->tk_pid, task->tk_auth->au_ops->au_name, cred); | 468 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
468 | 469 | ||
469 | return cred->cr_ops->crvalidate(task, p); | 470 | return cred->cr_ops->crvalidate(task, p); |
470 | } | 471 | } |
@@ -505,7 +506,7 @@ rpcauth_refreshcred(struct rpc_task *task) | |||
505 | int err; | 506 | int err; |
506 | 507 | ||
507 | dprintk("RPC: %5u refreshing %s cred %p\n", | 508 | dprintk("RPC: %5u refreshing %s cred %p\n", |
508 | task->tk_pid, task->tk_auth->au_ops->au_name, cred); | 509 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
509 | 510 | ||
510 | err = cred->cr_ops->crrefresh(task); | 511 | err = cred->cr_ops->crrefresh(task); |
511 | if (err < 0) | 512 | if (err < 0) |
@@ -519,7 +520,7 @@ rpcauth_invalcred(struct rpc_task *task) | |||
519 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 520 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
520 | 521 | ||
521 | dprintk("RPC: %5u invalidating %s cred %p\n", | 522 | dprintk("RPC: %5u invalidating %s cred %p\n", |
522 | task->tk_pid, task->tk_auth->au_ops->au_name, cred); | 523 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
523 | if (cred) | 524 | if (cred) |
524 | clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); | 525 | clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); |
525 | } | 526 | } |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 15da6f82db36..debcda86467c 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -906,7 +906,7 @@ gss_validate(struct rpc_task *task, __be32 *p) | |||
906 | goto out_bad; | 906 | goto out_bad; |
907 | /* We leave it to unwrap to calculate au_rslack. For now we just | 907 | /* We leave it to unwrap to calculate au_rslack. For now we just |
908 | * calculate the length of the verifier: */ | 908 | * calculate the length of the verifier: */ |
909 | task->tk_auth->au_verfsize = XDR_QUADLEN(len) + 2; | 909 | cred->cr_auth->au_verfsize = XDR_QUADLEN(len) + 2; |
910 | gss_put_ctx(ctx); | 910 | gss_put_ctx(ctx); |
911 | dprintk("RPC: %5u gss_validate: gss_verify_mic succeeded.\n", | 911 | dprintk("RPC: %5u gss_validate: gss_verify_mic succeeded.\n", |
912 | task->tk_pid); | 912 | task->tk_pid); |
@@ -1206,7 +1206,7 @@ gss_unwrap_resp(struct rpc_task *task, | |||
1206 | break; | 1206 | break; |
1207 | } | 1207 | } |
1208 | /* take into account extra slack for integrity and privacy cases: */ | 1208 | /* take into account extra slack for integrity and privacy cases: */ |
1209 | task->tk_auth->au_rslack = task->tk_auth->au_verfsize + (p - savedp) | 1209 | cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) |
1210 | + (savedlen - head->iov_len); | 1210 | + (savedlen - head->iov_len); |
1211 | out_decode: | 1211 | out_decode: |
1212 | status = decode(rqstp, p, obj); | 1212 | status = decode(rqstp, p, obj); |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index d9c50d810d15..5ed91e5bcee4 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -204,7 +204,7 @@ unx_validate(struct rpc_task *task, __be32 *p) | |||
204 | printk("RPC: giant verf size: %u\n", size); | 204 | printk("RPC: giant verf size: %u\n", size); |
205 | return NULL; | 205 | return NULL; |
206 | } | 206 | } |
207 | task->tk_auth->au_rslack = (size >> 2) + 2; | 207 | task->tk_msg.rpc_cred->cr_auth->au_rslack = (size >> 2) + 2; |
208 | p += (size >> 2); | 208 | p += (size >> 2); |
209 | 209 | ||
210 | return p; | 210 | return p; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 28a789419f64..50af8bbe7f20 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -787,7 +787,7 @@ call_reserveresult(struct rpc_task *task) | |||
787 | static void | 787 | static void |
788 | call_allocate(struct rpc_task *task) | 788 | call_allocate(struct rpc_task *task) |
789 | { | 789 | { |
790 | unsigned int slack = task->tk_auth->au_cslack; | 790 | unsigned int slack = task->tk_msg.rpc_cred->cr_auth->au_cslack; |
791 | struct rpc_rqst *req = task->tk_rqstp; | 791 | struct rpc_rqst *req = task->tk_rqstp; |
792 | struct rpc_xprt *xprt = task->tk_xprt; | 792 | struct rpc_xprt *xprt = task->tk_xprt; |
793 | struct rpc_procinfo *proc = task->tk_msg.rpc_proc; | 793 | struct rpc_procinfo *proc = task->tk_msg.rpc_proc; |