X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsunrpc%2Fsvc.c;h=8c5b0517db7fe58dbba43e1de5e510c0a1ef2d89;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=14c561ddac3a5edb1317edb10e64fc8f3d5b3baa;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 14c561dda..8c5b0517d 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -257,12 +257,13 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) struct svc_program *progp; struct svc_version *versp = NULL; /* compiler food */ struct svc_procedure *procp = NULL; - struct iovec * argv = &rqstp->rq_arg.head[0]; - struct iovec * resv = &rqstp->rq_res.head[0]; + struct kvec * argv = &rqstp->rq_arg.head[0]; + struct kvec * resv = &rqstp->rq_res.head[0]; kxdrproc_t xdr; u32 *statp; u32 dir, prog, vers, proc, auth_stat, rpc_stat; + int auth_res; rpc_stat = rpc_success; @@ -304,12 +305,17 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) rqstp->rq_vers = vers = ntohl(svc_getu32(argv)); /* version number */ rqstp->rq_proc = proc = ntohl(svc_getu32(argv)); /* procedure number */ + progp = serv->sv_program; /* * Decode auth data, and add verifier to reply buffer. * We do this before anything else in order to get a decent * auth verifier. */ - switch (svc_authenticate(rqstp, &auth_stat)) { + if (progp->pg_authenticate != NULL) + auth_res = progp->pg_authenticate(rqstp, &auth_stat); + else + auth_res = svc_authenticate(rqstp, &auth_stat); + switch (auth_res) { case SVC_OK: break; case SVC_GARBAGE: @@ -326,7 +332,6 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) goto sendit; } - progp = serv->sv_program; if (prog != progp->pg_prog) goto err_bad_prog;