Commit 1cbfb921 authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Remove gss_read_verf()

gss_read_verf() is already short. Fold it into its only caller.
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 4d51366d
...@@ -1090,28 +1090,6 @@ gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp, ...@@ -1090,28 +1090,6 @@ gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp,
return rc; return rc;
} }
static inline int
gss_read_verf(struct rpc_gss_wire_cred *gc,
struct kvec *argv, __be32 *authp,
struct xdr_netobj *in_handle,
struct xdr_netobj *in_token)
{
struct xdr_netobj tmpobj;
if (dup_netobj(in_handle, &gc->gc_ctx))
return SVC_CLOSE;
if (svc_safe_getnetobj(argv, &tmpobj)) {
kfree(in_handle->data);
return SVC_DENIED;
}
if (dup_netobj(in_token, &tmpobj)) {
kfree(in_handle->data);
return SVC_CLOSE;
}
return 0;
}
static void gss_free_in_token_pages(struct gssp_in_token *in_token) static void gss_free_in_token_pages(struct gssp_in_token *in_token)
{ {
u32 inlen; u32 inlen;
...@@ -1224,14 +1202,21 @@ static int svcauth_gss_legacy_init(struct svc_rqst *rqstp, ...@@ -1224,14 +1202,21 @@ static int svcauth_gss_legacy_init(struct svc_rqst *rqstp,
struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *argv = &rqstp->rq_arg.head[0];
struct kvec *resv = &rqstp->rq_res.head[0]; struct kvec *resv = &rqstp->rq_res.head[0];
struct rsi *rsip, rsikey; struct rsi *rsip, rsikey;
struct xdr_netobj tmpobj;
int ret; int ret;
struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id); struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id);
memset(&rsikey, 0, sizeof(rsikey)); memset(&rsikey, 0, sizeof(rsikey));
ret = gss_read_verf(gc, argv, &rqstp->rq_auth_stat, if (dup_netobj(&rsikey.in_handle, &gc->gc_ctx))
&rsikey.in_handle, &rsikey.in_token); return SVC_CLOSE;
if (ret) if (svc_safe_getnetobj(argv, &tmpobj)) {
return ret; kfree(rsikey.in_handle.data);
return SVC_DENIED;
}
if (dup_netobj(&rsikey.in_token, &tmpobj)) {
kfree(rsikey.in_handle.data);
return SVC_CLOSE;
}
/* Perform upcall, or find upcall result: */ /* Perform upcall, or find upcall result: */
rsip = rsi_lookup(sn->rsi_cache, &rsikey); rsip = rsi_lookup(sn->rsi_cache, &rsikey);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment