Lines Matching refs:rqstp

629 static bool gss_check_seq_num(const struct svc_rqst *rqstp, struct rsc *rsci,  in gss_check_seq_num()  argument
659 trace_rpcgss_svc_seqno_low(rqstp, seq_num, in gss_check_seq_num()
664 trace_rpcgss_svc_seqno_seen(rqstp, seq_num); in gss_check_seq_num()
713 gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci, in gss_verify_header() argument
720 struct kvec *argv = &rqstp->rq_arg.head[0]; in gss_verify_header()
737 if (rqstp->rq_deferred) /* skip verification of revisited request */ in gss_verify_header()
745 trace_rpcgss_svc_seqno_large(rqstp, gc->gc_seq); in gss_verify_header()
749 if (!gss_check_seq_num(rqstp, rsci, gc->gc_seq)) in gss_verify_header()
755 gss_write_null_verf(struct svc_rqst *rqstp) in gss_write_null_verf() argument
759 svc_putnl(rqstp->rq_res.head, RPC_AUTH_NULL); in gss_write_null_verf()
760 p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; in gss_write_null_verf()
763 if (!xdr_ressize_check(rqstp, p)) in gss_write_null_verf()
769 gss_write_verf(struct svc_rqst *rqstp, struct gss_ctx *ctx_id, u32 seq) in gss_write_verf() argument
779 svc_putnl(rqstp->rq_res.head, RPC_AUTH_GSS); in gss_write_verf()
788 p = rqstp->rq_res.head->iov_base + rqstp->rq_res.head->iov_len; in gss_write_verf()
796 if (!xdr_ressize_check(rqstp, p)) in gss_write_verf()
886 unwrap_integ_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) in unwrap_integ_data() argument
901 clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); in unwrap_integ_data()
904 if (rqstp->rq_deferred) in unwrap_integ_data()
939 trace_rpcgss_svc_unwrap_failed(rqstp); in unwrap_integ_data()
942 trace_rpcgss_svc_seqno_bad(rqstp, seq, rseqno); in unwrap_integ_data()
945 trace_rpcgss_svc_mic(rqstp, maj_stat); in unwrap_integ_data()
967 unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gss_ctx *ctx) in unwrap_priv_data() argument
973 clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); in unwrap_priv_data()
976 if (rqstp->rq_deferred) { in unwrap_priv_data()
1014 trace_rpcgss_svc_unwrap_failed(rqstp); in unwrap_priv_data()
1017 trace_rpcgss_svc_seqno_bad(rqstp, seq, rseqno); in unwrap_priv_data()
1020 trace_rpcgss_svc_unwrap(rqstp, maj_stat); in unwrap_priv_data()
1034 svcauth_gss_set_client(struct svc_rqst *rqstp) in svcauth_gss_set_client() argument
1036 struct gss_svc_data *svcdata = rqstp->rq_auth_data; in svcauth_gss_set_client()
1050 rqstp->rq_gssclient = find_gss_auth_domain(rsci->mechctx, gc->gc_svc); in svcauth_gss_set_client()
1051 if (rqstp->rq_gssclient == NULL) in svcauth_gss_set_client()
1053 stat = svcauth_unix_set_client(rqstp); in svcauth_gss_set_client()
1060 gss_write_init_verf(struct cache_detail *cd, struct svc_rqst *rqstp, in gss_write_init_verf() argument
1067 return gss_write_null_verf(rqstp); in gss_write_init_verf()
1071 return gss_write_null_verf(rqstp); in gss_write_init_verf()
1073 rc = gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN); in gss_write_init_verf()
1144 static int gss_read_proxy_verf(struct svc_rqst *rqstp, in gss_read_proxy_verf() argument
1149 struct kvec *argv = &rqstp->rq_arg.head[0]; in gss_read_proxy_verf()
1159 if (inlen > (argv->iov_len + rqstp->rq_arg.page_len)) in gss_read_proxy_verf()
1181 from_offs = rqstp->rq_arg.page_base; in gss_read_proxy_verf()
1192 page_address(rqstp->rq_arg.pages[pgfrom]) + pgfrom_offs, in gss_read_proxy_verf()
1229 static int svcauth_gss_legacy_init(struct svc_rqst *rqstp, in svcauth_gss_legacy_init() argument
1232 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_gss_legacy_init()
1233 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_legacy_init()
1236 struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id); in svcauth_gss_legacy_init()
1249 if (cache_check(sn->rsi_cache, &rsip->h, &rqstp->rq_chandle) < 0) in svcauth_gss_legacy_init()
1255 if (gss_write_init_verf(sn->rsc_cache, rqstp, in svcauth_gss_legacy_init()
1341 static int svcauth_gss_proxy_init(struct svc_rqst *rqstp, in svcauth_gss_proxy_init() argument
1344 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_proxy_init()
1350 struct net *net = SVC_NET(rqstp); in svcauth_gss_proxy_init()
1354 ret = gss_read_proxy_verf(rqstp, gc, authp, in svcauth_gss_proxy_init()
1366 trace_rpcgss_svc_accept_upcall(rqstp, ud.major_status, ud.minor_status); in svcauth_gss_proxy_init()
1384 if (gss_write_init_verf(sn->rsc_cache, rqstp, in svcauth_gss_proxy_init()
1528 svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp) in svcauth_gss_accept() argument
1530 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_gss_accept()
1531 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_gss_accept()
1533 struct gss_svc_data *svcdata = rqstp->rq_auth_data; in svcauth_gss_accept()
1539 struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id); in svcauth_gss_accept()
1546 rqstp->rq_auth_data = svcdata; in svcauth_gss_accept()
1575 if ((gc->gc_proc != RPC_GSS_PROC_DATA) && (rqstp->rq_proc != 0)) in svcauth_gss_accept()
1582 if (use_gss_proxy(SVC_NET(rqstp))) in svcauth_gss_accept()
1583 return svcauth_gss_proxy_init(rqstp, gc, authp); in svcauth_gss_accept()
1585 return svcauth_gss_legacy_init(rqstp, gc, authp); in svcauth_gss_accept()
1593 switch (gss_verify_header(rqstp, rsci, rpcstart, gc, authp)) { in svcauth_gss_accept()
1610 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) in svcauth_gss_accept()
1621 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq)) in svcauth_gss_accept()
1623 rqstp->rq_cred = rsci->cred; in svcauth_gss_accept()
1633 if (unwrap_integ_data(rqstp, &rqstp->rq_arg, in svcauth_gss_accept()
1636 rqstp->rq_auth_slack = RPC_MAX_AUTH_SIZE; in svcauth_gss_accept()
1642 if (unwrap_priv_data(rqstp, &rqstp->rq_arg, in svcauth_gss_accept()
1645 rqstp->rq_auth_slack = RPC_MAX_AUTH_SIZE * 2; in svcauth_gss_accept()
1652 rqstp->rq_cred.cr_flavor = gss_svc_to_pseudoflavor( in svcauth_gss_accept()
1657 trace_rpcgss_svc_authenticate(rqstp, gc); in svcauth_gss_accept()
1665 xdr_ressize_check(rqstp, reject_stat); in svcauth_gss_accept()
1707 svcauth_gss_wrap_resp_integ(struct svc_rqst *rqstp) in svcauth_gss_wrap_resp_integ() argument
1709 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_wrap_resp_integ()
1711 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_wrap_resp_integ()
1758 svcauth_gss_wrap_resp_priv(struct svc_rqst *rqstp) in svcauth_gss_wrap_resp_priv() argument
1760 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_wrap_resp_priv()
1762 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_wrap_resp_priv()
1825 svcauth_gss_release(struct svc_rqst *rqstp) in svcauth_gss_release() argument
1827 struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data; in svcauth_gss_release()
1829 struct xdr_buf *resbuf = &rqstp->rq_res; in svcauth_gss_release()
1831 struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id); in svcauth_gss_release()
1849 stat = svcauth_gss_wrap_resp_integ(rqstp); in svcauth_gss_release()
1854 stat = svcauth_gss_wrap_resp_priv(rqstp); in svcauth_gss_release()
1867 if (rqstp->rq_client) in svcauth_gss_release()
1868 auth_domain_put(rqstp->rq_client); in svcauth_gss_release()
1869 rqstp->rq_client = NULL; in svcauth_gss_release()
1870 if (rqstp->rq_gssclient) in svcauth_gss_release()
1871 auth_domain_put(rqstp->rq_gssclient); in svcauth_gss_release()
1872 rqstp->rq_gssclient = NULL; in svcauth_gss_release()
1873 if (rqstp->rq_cred.cr_group_info) in svcauth_gss_release()
1874 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_gss_release()
1875 rqstp->rq_cred.cr_group_info = NULL; in svcauth_gss_release()