goto out;
ret = SVC_COMPLETE;
+ svcxdr_init_encode(rqstp);
out:
cache_put(&rsip->h, sn->rsi_cache);
return ret;
goto out;
ret = SVC_COMPLETE;
+ svcxdr_init_encode(rqstp);
out:
gss_free_in_token_pages(&ud.in_token);
gssp_free_upcall_data(&ud);
rqstp->rq_auth_stat = rpc_autherr_badcred;
switch (gc->gc_svc) {
case RPC_GSS_SVC_NONE:
+ svcxdr_init_encode(rqstp);
break;
case RPC_GSS_SVC_INTEGRITY:
/* placeholders for length and seq. number: */
rsci->mechctx))
goto garbage_args;
rqstp->rq_auth_slack = RPC_MAX_AUTH_SIZE;
+ svcxdr_init_encode(rqstp);
break;
case RPC_GSS_SVC_PRIVACY:
/* placeholders for length and seq. number: */
rsci->mechctx))
goto garbage_args;
rqstp->rq_auth_slack = RPC_MAX_AUTH_SIZE * 2;
+ svcxdr_init_encode(rqstp);
break;
default:
goto auth_err;
serv->sv_stats->rpccnt++;
trace_svc_process(rqstp, progp->pg_name);
- /* Build the reply header. */
- statp = resv->iov_base +resv->iov_len;
- svc_putnl(resv, RPC_SUCCESS);
+ statp = xdr_reserve_space(&rqstp->rq_res_stream, XDR_UNIT);
+ *statp = rpc_success;
/* un-reserve some of the out-queue now that we have a
* better idea of reply size
*/
if (procp->pc_xdrressize)
svc_reserve_auth(rqstp, procp->pc_xdrressize<<2);
- svcxdr_init_encode(rqstp);
/* Call the function that processes the request. */
rc = process.dispatch(rqstp, statp);
svc_putnl(resv, 0);
rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL;
+ svcxdr_init_encode(rqstp);
return SVC_OK;
}
svc_putnl(resv, 0);
rqstp->rq_cred.cr_flavor = RPC_AUTH_TLS;
+ svcxdr_init_encode(rqstp);
return SVC_OK;
}
svc_putnl(resv, 0);
rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX;
+ svcxdr_init_encode(rqstp);
return SVC_OK;
badcred: