aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sunrpc/auth.h2
-rw-r--r--net/sunrpc/auth.c12
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c2
-rw-r--r--net/sunrpc/auth_null.c1
-rw-r--r--net/sunrpc/auth_unix.c1
5 files changed, 1 insertions, 17 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index b9449aa27fed..5486082d3d63 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -133,7 +133,6 @@ struct rpc_credops {
133 void (*crdestroy)(struct rpc_cred *); 133 void (*crdestroy)(struct rpc_cred *);
134 134
135 int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); 135 int (*crmatch)(struct auth_cred *, struct rpc_cred *, int);
136 struct rpc_cred * (*crbind)(struct rpc_task *, struct rpc_cred *, int);
137 __be32 * (*crmarshal)(struct rpc_task *, __be32 *); 136 __be32 * (*crmarshal)(struct rpc_task *, __be32 *);
138 int (*crrefresh)(struct rpc_task *); 137 int (*crrefresh)(struct rpc_task *);
139 __be32 * (*crvalidate)(struct rpc_task *, __be32 *); 138 __be32 * (*crvalidate)(struct rpc_task *, __be32 *);
@@ -167,7 +166,6 @@ int rpcauth_list_flavors(rpc_authflavor_t *, int);
167struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int, gfp_t); 166struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int, gfp_t);
168void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); 167void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *);
169struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int); 168struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
170struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int);
171void put_rpccred(struct rpc_cred *); 169void put_rpccred(struct rpc_cred *);
172__be32 * rpcauth_marshcred(struct rpc_task *, __be32 *); 170__be32 * rpcauth_marshcred(struct rpc_task *, __be32 *);
173__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *); 171__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *);
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 2debbaba7809..867ea9834bde 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -658,15 +658,6 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
658} 658}
659EXPORT_SYMBOL_GPL(rpcauth_init_cred); 659EXPORT_SYMBOL_GPL(rpcauth_init_cred);
660 660
661struct rpc_cred *
662rpcauth_generic_bind_cred(struct rpc_task *task, struct rpc_cred *cred, int lookupflags)
663{
664 dprintk("RPC: %5u holding %s cred %p\n", task->tk_pid,
665 cred->cr_auth->au_ops->au_name, cred);
666 return get_rpccred(cred);
667}
668EXPORT_SYMBOL_GPL(rpcauth_generic_bind_cred);
669
670static struct rpc_cred * 661static struct rpc_cred *
671rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags) 662rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
672{ 663{
@@ -724,8 +715,7 @@ rpcauth_bindcred(struct rpc_task *task, const struct cred *cred, int flags)
724 lookupflags |= RPCAUTH_LOOKUP_NEW; 715 lookupflags |= RPCAUTH_LOOKUP_NEW;
725 if (task->tk_op_cred) 716 if (task->tk_op_cred)
726 /* Task must use exactly this rpc_cred */ 717 /* Task must use exactly this rpc_cred */
727 new = task->tk_op_cred->cr_ops->crbind(task, task->tk_op_cred, 718 new = get_rpccred(task->tk_op_cred);
728 lookupflags);
729 else if (cred != NULL && cred != &machine_cred) 719 else if (cred != NULL && cred != &machine_cred)
730 new = auth->au_ops->lookup_cred(auth, &acred, lookupflags); 720 new = auth->au_ops->lookup_cred(auth, &acred, lookupflags);
731 else if (cred == &machine_cred) 721 else if (cred == &machine_cred)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 03a1cd5bfb43..4e1a2ebef814 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2095,7 +2095,6 @@ static const struct rpc_credops gss_credops = {
2095 .cr_name = "AUTH_GSS", 2095 .cr_name = "AUTH_GSS",
2096 .crdestroy = gss_destroy_cred, 2096 .crdestroy = gss_destroy_cred,
2097 .cr_init = gss_cred_init, 2097 .cr_init = gss_cred_init,
2098 .crbind = rpcauth_generic_bind_cred,
2099 .crmatch = gss_match, 2098 .crmatch = gss_match,
2100 .crmarshal = gss_marshal, 2099 .crmarshal = gss_marshal,
2101 .crrefresh = gss_refresh, 2100 .crrefresh = gss_refresh,
@@ -2110,7 +2109,6 @@ static const struct rpc_credops gss_credops = {
2110static const struct rpc_credops gss_nullops = { 2109static const struct rpc_credops gss_nullops = {
2111 .cr_name = "AUTH_GSS", 2110 .cr_name = "AUTH_GSS",
2112 .crdestroy = gss_destroy_nullcred, 2111 .crdestroy = gss_destroy_nullcred,
2113 .crbind = rpcauth_generic_bind_cred,
2114 .crmatch = gss_match, 2112 .crmatch = gss_match,
2115 .crmarshal = gss_marshal, 2113 .crmarshal = gss_marshal,
2116 .crrefresh = gss_refresh_null, 2114 .crrefresh = gss_refresh_null,
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c
index 830686e80bed..d0ceac57c06e 100644
--- a/net/sunrpc/auth_null.c
+++ b/net/sunrpc/auth_null.c
@@ -123,7 +123,6 @@ static
123const struct rpc_credops null_credops = { 123const struct rpc_credops null_credops = {
124 .cr_name = "AUTH_NULL", 124 .cr_name = "AUTH_NULL",
125 .crdestroy = nul_destroy_cred, 125 .crdestroy = nul_destroy_cred,
126 .crbind = rpcauth_generic_bind_cred,
127 .crmatch = nul_match, 126 .crmatch = nul_match,
128 .crmarshal = nul_marshal, 127 .crmarshal = nul_marshal,
129 .crrefresh = nul_refresh, 128 .crrefresh = nul_refresh,
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index 6ee43bfbfb4b..bff113a411e0 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -246,7 +246,6 @@ static
246const struct rpc_credops unix_credops = { 246const struct rpc_credops unix_credops = {
247 .cr_name = "AUTH_UNIX", 247 .cr_name = "AUTH_UNIX",
248 .crdestroy = unx_destroy_cred, 248 .crdestroy = unx_destroy_cred,
249 .crbind = rpcauth_generic_bind_cred,
250 .crmatch = unx_match, 249 .crmatch = unx_match,
251 .crmarshal = unx_marshal, 250 .crmarshal = unx_marshal,
252 .crrefresh = unx_refresh, 251 .crrefresh = unx_refresh,