Commit 6496500c authored by J. Bruce Fields's avatar J. Bruce Fields

svcrpc: move some initialization to common code

Minor cleanup, no change in behavior.
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d3f03403
...@@ -55,6 +55,7 @@ svc_authenticate(struct svc_rqst *rqstp, __be32 *authp) ...@@ -55,6 +55,7 @@ svc_authenticate(struct svc_rqst *rqstp, __be32 *authp)
spin_unlock(&authtab_lock); spin_unlock(&authtab_lock);
rqstp->rq_auth_slack = 0; rqstp->rq_auth_slack = 0;
init_svc_cred(&rqstp->rq_cred);
rqstp->rq_authop = aops; rqstp->rq_authop = aops;
return aops->accept(rqstp, authp); return aops->accept(rqstp, authp);
...@@ -63,6 +64,7 @@ EXPORT_SYMBOL_GPL(svc_authenticate); ...@@ -63,6 +64,7 @@ EXPORT_SYMBOL_GPL(svc_authenticate);
int svc_set_client(struct svc_rqst *rqstp) int svc_set_client(struct svc_rqst *rqstp)
{ {
rqstp->rq_client = NULL;
return rqstp->rq_authop->set_client(rqstp); return rqstp->rq_authop->set_client(rqstp);
} }
EXPORT_SYMBOL_GPL(svc_set_client); EXPORT_SYMBOL_GPL(svc_set_client);
......
...@@ -728,10 +728,6 @@ svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp) ...@@ -728,10 +728,6 @@ svcauth_null_accept(struct svc_rqst *rqstp, __be32 *authp)
struct kvec *resv = &rqstp->rq_res.head[0]; struct kvec *resv = &rqstp->rq_res.head[0];
struct svc_cred *cred = &rqstp->rq_cred; struct svc_cred *cred = &rqstp->rq_cred;
cred->cr_group_info = NULL;
cred->cr_principal = NULL;
rqstp->rq_client = NULL;
if (argv->iov_len < 3*4) if (argv->iov_len < 3*4)
return SVC_GARBAGE; return SVC_GARBAGE;
...@@ -794,10 +790,6 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp) ...@@ -794,10 +790,6 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
u32 slen, i; u32 slen, i;
int len = argv->iov_len; int len = argv->iov_len;
cred->cr_group_info = NULL;
cred->cr_principal = NULL;
rqstp->rq_client = NULL;
if ((len -= 3*4) < 0) if ((len -= 3*4) < 0)
return SVC_GARBAGE; return SVC_GARBAGE;
......
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