Commit 4d51366d authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Remove gss_read_common_verf()

gss_read_common_verf() is now just a wrapper for dup_netobj(), thus
it can be replaced with direct calls to dup_netobj().
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 20ebe927
...@@ -1090,18 +1090,6 @@ gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp, ...@@ -1090,18 +1090,6 @@ gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp,
return rc; return rc;
} }
static inline int
gss_read_common_verf(struct rpc_gss_wire_cred *gc,
struct kvec *argv, __be32 *authp,
struct xdr_netobj *in_handle)
{
if (dup_netobj(in_handle, &gc->gc_ctx))
return SVC_CLOSE;
*authp = rpc_autherr_badverf;
return 0;
}
static inline int static inline int
gss_read_verf(struct rpc_gss_wire_cred *gc, gss_read_verf(struct rpc_gss_wire_cred *gc,
struct kvec *argv, __be32 *authp, struct kvec *argv, __be32 *authp,
...@@ -1109,12 +1097,9 @@ gss_read_verf(struct rpc_gss_wire_cred *gc, ...@@ -1109,12 +1097,9 @@ gss_read_verf(struct rpc_gss_wire_cred *gc,
struct xdr_netobj *in_token) struct xdr_netobj *in_token)
{ {
struct xdr_netobj tmpobj; struct xdr_netobj tmpobj;
int res;
res = gss_read_common_verf(gc, argv, authp, in_handle);
if (res)
return res;
if (dup_netobj(in_handle, &gc->gc_ctx))
return SVC_CLOSE;
if (svc_safe_getnetobj(argv, &tmpobj)) { if (svc_safe_getnetobj(argv, &tmpobj)) {
kfree(in_handle->data); kfree(in_handle->data);
return SVC_DENIED; return SVC_DENIED;
...@@ -1151,12 +1136,11 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp, ...@@ -1151,12 +1136,11 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp,
{ {
struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *argv = &rqstp->rq_arg.head[0];
unsigned int length, pgto_offs, pgfrom_offs; unsigned int length, pgto_offs, pgfrom_offs;
int pages, i, res, pgto, pgfrom;
size_t inlen, to_offs, from_offs; size_t inlen, to_offs, from_offs;
int pages, i, pgto, pgfrom;
res = gss_read_common_verf(gc, argv, &rqstp->rq_auth_stat, in_handle); if (dup_netobj(in_handle, &gc->gc_ctx))
if (res) return SVC_CLOSE;
return res;
inlen = svc_getnl(argv); inlen = svc_getnl(argv);
if (inlen > (argv->iov_len + rqstp->rq_arg.page_len)) { if (inlen > (argv->iov_len + rqstp->rq_arg.page_len)) {
......
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