X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fsunrpc%2Fauth.c;h=eca941ce298b6465507c2f672dc5bf44350fffe6;hb=3cecdda3f169f22f324f78fd544beee68e3cc6a4;hp=29a8ecc609284db068aa32d1b5a243a988c03715;hpb=49c13b51a15f1ba9f6d47e26e4a3886c4f3931e2;p=linux-2.6 diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 29a8ecc609..eca941ce29 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -13,7 +13,6 @@ #include #include #include -#include #ifdef RPC_DEBUG # define RPCDBG_FACILITY RPCDBG_AUTH @@ -52,6 +51,7 @@ rpcauth_register(const struct rpc_authops *ops) spin_unlock(&rpc_authflavor_lock); return ret; } +EXPORT_SYMBOL_GPL(rpcauth_register); int rpcauth_unregister(const struct rpc_authops *ops) @@ -69,6 +69,7 @@ rpcauth_unregister(const struct rpc_authops *ops) spin_unlock(&rpc_authflavor_lock); return ret; } +EXPORT_SYMBOL_GPL(rpcauth_unregister); struct rpc_auth * rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt) @@ -103,6 +104,7 @@ rpcauth_create(rpc_authflavor_t pseudoflavor, struct rpc_clnt *clnt) out: return auth; } +EXPORT_SYMBOL_GPL(rpcauth_create); void rpcauth_release(struct rpc_auth *auth) @@ -152,6 +154,7 @@ rpcauth_init_credcache(struct rpc_auth *auth) auth->au_credcache = new; return 0; } +EXPORT_SYMBOL_GPL(rpcauth_init_credcache); /* * Destroy a list of credentials @@ -214,6 +217,7 @@ rpcauth_destroy_credcache(struct rpc_auth *auth) kfree(cache); } } +EXPORT_SYMBOL_GPL(rpcauth_destroy_credcache); /* * Remove stale credentials. Avoid sleeping inside the loop. @@ -333,6 +337,7 @@ found: out: return cred; } +EXPORT_SYMBOL_GPL(rpcauth_lookup_credcache); struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *auth, int flags) @@ -351,6 +356,7 @@ rpcauth_lookupcred(struct rpc_auth *auth, int flags) put_group_info(acred.group_info); return ret; } +EXPORT_SYMBOL_GPL(rpcauth_lookupcred); void rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred, @@ -367,7 +373,7 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred, #endif cred->cr_uid = acred->uid; } -EXPORT_SYMBOL(rpcauth_init_cred); +EXPORT_SYMBOL_GPL(rpcauth_init_cred); struct rpc_cred * rpcauth_bindcred(struct rpc_task *task) @@ -436,6 +442,7 @@ need_lock: out_destroy: cred->cr_ops->crdestroy(cred); } +EXPORT_SYMBOL_GPL(put_rpccred); void rpcauth_unbindcred(struct rpc_task *task) @@ -476,17 +483,13 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, __be32 *data, void *obj) { struct rpc_cred *cred = task->tk_msg.rpc_cred; - int ret; dprintk("RPC: %5u using %s cred %p to wrap rpc data\n", task->tk_pid, cred->cr_ops->cr_name, cred); if (cred->cr_ops->crwrap_req) return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj); /* By default, we encode the arguments normally. */ - lock_kernel(); - ret = encode(rqstp, data, obj); - unlock_kernel(); - return ret; + return rpc_call_xdrproc(encode, rqstp, data, obj); } int @@ -494,7 +497,6 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, __be32 *data, void *obj) { struct rpc_cred *cred = task->tk_msg.rpc_cred; - int ret; dprintk("RPC: %5u using %s cred %p to unwrap rpc data\n", task->tk_pid, cred->cr_ops->cr_name, cred); @@ -502,10 +504,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, return cred->cr_ops->crunwrap_resp(task, decode, rqstp, data, obj); /* By default, we decode the arguments normally. */ - lock_kernel(); - ret = decode(rqstp, data, obj); - unlock_kernel(); - return ret; + return rpc_call_xdrproc(decode, rqstp, data, obj); } int