Lines Matching refs:rqstp
661 gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, in gss_verify_header() argument
668 struct kvec *argv = &rqstp->rq_arg.head[0]; in gss_verify_header()
685 if (rqstp->rq_deferred) /* skip verification of revisited request */ in gss_verify_header()
707 gss_write_null_verf(struct svc_rqst *rqstp) in gss_write_null_verf() argument
711 svc_putnl(rqstp->rq_res.head, RPC_AUTH_NULL); in gss_write_null_verf()
712 p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; in gss_write_null_verf()
715 if (!xdr_ressize_check(rqstp, p)) in gss_write_null_verf()
721 gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) in gss_write_verf() argument
730 svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); in gss_write_verf()
736 p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; in gss_write_verf()
744 if (!xdr_ressize_check(rqstp, p)) in gss_write_verf()
829 unwrap_integ_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) in unwrap_integ_data() argument
837 if (rqstp->rq_deferred) in unwrap_integ_data()
888 unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) in unwrap_priv_data() argument
893 rqstp->rq_splice_ok = 0; in unwrap_priv_data()
896 if (rqstp->rq_deferred) { in unwrap_priv_data()
948 svcauth_gss_set_client(struct svc_rqst *rqstp) in svcauth_gss_set_client() argument
950 struct gss_svc_data *svcdata = rqstp->rq_auth_data; in svcauth_gss_set_client()
964 rqstp->rq_gssclient = find_gss_auth_domain(rsci->mechctx, gc->gc_svc); in svcauth_gss_set_client()
965 if (rqstp->rq_gssclient == NULL) in svcauth_gss_set_client()
967 stat = svcauth_unix_set_client(rqstp); in svcauth_gss_set_client()
974 gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp, in gss_write_init_verf() argument
981 return gss_write_null_verf(rqstp); in gss_write_init_verf()
985 return gss_write_null_verf(rqstp); in gss_write_init_verf()
987 rc = gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); in gss_write_init_verf()
1051 gss_read_proxy_verf(struct svc_rqst *rqstp, in gss_read_proxy_verf() argument
1056 struct kvec *argv = &rqstp->rq_arg.head[0]; in gss_read_proxy_verf()
1065 if (inlen > (argv->iov_len + rqstp->rq_arg.page_len)) in gss_read_proxy_verf()
1068 in_token->pages = rqstp->rq_pages; in gss_read_proxy_verf()
1102 static int svcauth_gss_legacy_init(struct svc_rqst *rqstp, in svcauth_gss_legacy_init() argument
1105 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_gss_legacy_init()
1106 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_legacy_init()
1109 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, sunrpc_net_id); in svcauth_gss_legacy_init()
1122 if (cache_check(sn->rsi_cache, &rsip->h, &rqstp->rq_chandle) < 0) in svcauth_gss_legacy_init()
1128 if (gss_write_init_verf(sn->rsc_cache, rqstp, in svcauth_gss_legacy_init()
1211 static int svcauth_gss_proxy_init(struct svc_rqst *rqstp, in svcauth_gss_proxy_init() argument
1214 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_proxy_init()
1220 struct net *net = rqstp->rq_xprt->xpt_net; in svcauth_gss_proxy_init()
1224 ret = gss_read_proxy_verf(rqstp, gc, authp, in svcauth_gss_proxy_init()
1256 if (gss_write_init_verf(sn->rsc_cache, rqstp, in svcauth_gss_proxy_init()
1434 svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) in svcauth_gss_accept() argument
1436 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_gss_accept()
1437 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_accept()
1439 struct gss_svc_data *svcdata = rqstp->rq_auth_data; in svcauth_gss_accept()
1445 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, sunrpc_net_id); in svcauth_gss_accept()
1455 rqstp->rq_auth_data = svcdata; in svcauth_gss_accept()
1484 if ((gc->gc_proc != RPC_GSS_PROC_DATA) && (rqstp->rq_proc != 0)) in svcauth_gss_accept()
1491 if (use_gss_proxy(SVC_NET(rqstp))) in svcauth_gss_accept()
1492 return svcauth_gss_proxy_init(rqstp, gc, authp); in svcauth_gss_accept()
1494 return svcauth_gss_legacy_init(rqstp, gc, authp); in svcauth_gss_accept()
1502 switch (gss_verify_header(rqstp, rsci, rpcstart, gc, authp)) { in svcauth_gss_accept()
1519 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) in svcauth_gss_accept()
1530 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) in svcauth_gss_accept()
1532 rqstp->rq_cred = rsci->cred; in svcauth_gss_accept()
1542 if (unwrap_integ_data(rqstp, &rqstp->rq_arg, in svcauth_gss_accept()
1550 if (unwrap_priv_data(rqstp, &rqstp->rq_arg, in svcauth_gss_accept()
1559 rqstp->rq_cred.cr_flavor = gss_svc_to_pseudoflavor( in svcauth_gss_accept()
1571 xdr_ressize_check(rqstp, reject_stat); in svcauth_gss_accept()
1613 svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) in svcauth_gss_wrap_resp_integ() argument
1615 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_wrap_resp_integ()
1617 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_wrap_resp_integ()
1663 svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp) in svcauth_gss_wrap_resp_priv() argument
1665 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_wrap_resp_priv()
1667 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_wrap_resp_priv()
1728 svcauth_gss_release(struct svc_rqst *rqstp) in svcauth_gss_release() argument
1730 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_release()
1732 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_release()
1734 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, sunrpc_net_id); in svcauth_gss_release()
1749 stat = svcauth_gss_wrap_resp_integ(rqstp); in svcauth_gss_release()
1754 stat = svcauth_gss_wrap_resp_priv(rqstp); in svcauth_gss_release()
1767 if (rqstp->rq_client) in svcauth_gss_release()
1768 auth_domain_put(rqstp->rq_client); in svcauth_gss_release()
1769 rqstp->rq_client = NULL; in svcauth_gss_release()
1770 if (rqstp->rq_gssclient) in svcauth_gss_release()
1771 auth_domain_put(rqstp->rq_gssclient); in svcauth_gss_release()
1772 rqstp->rq_gssclient = NULL; in svcauth_gss_release()
1773 if (rqstp->rq_cred.cr_group_info) in svcauth_gss_release()
1774 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_gss_release()
1775 rqstp->rq_cred.cr_group_info = NULL; in svcauth_gss_release()