Lines Matching refs:rqstp
632 static struct group_info *unix_gid_find(kuid_t uid, struct svc_rqst *rqstp) in unix_gid_find() argument
637 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, in unix_gid_find()
643 ret = cache_check(sn->unix_gid_cache, &ug->h, &rqstp->rq_chandle); in unix_gid_find()
659 svcauth_unix_set_client(struct svc_rqst *rqstp) in svcauth_unix_set_client() argument
665 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client()
666 struct svc_xprt *xprt = rqstp->rq_xprt; in svcauth_unix_set_client()
670 switch (rqstp->rq_addr.ss_family) { in svcauth_unix_set_client()
672 sin = svc_addr_in(rqstp); in svcauth_unix_set_client()
677 sin6 = svc_addr_in6(rqstp); in svcauth_unix_set_client()
683 rqstp->rq_client = NULL; in svcauth_unix_set_client()
684 if (rqstp->rq_proc == 0) in svcauth_unix_set_client()
687 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_set_client()
690 ipm = __ip_map_lookup(sn->ip_map_cache, rqstp->rq_server->sv_program->pg_class, in svcauth_unix_set_client()
696 switch (cache_check(sn->ip_map_cache, &ipm->h, &rqstp->rq_chandle)) { in svcauth_unix_set_client()
706 rqstp->rq_client = &ipm->m_client->h; in svcauth_unix_set_client()
707 kref_get(&rqstp->rq_client->ref); in svcauth_unix_set_client()
712 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
726 rqstp->rq_auth_stat = rpc_auth_ok; in svcauth_unix_set_client()
733 svcauth_null_accept(struct svc_rqst *rqstp) in svcauth_null_accept() argument
735 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_null_accept()
736 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_null_accept()
737 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept()
744 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_null_accept()
749 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_null_accept()
764 rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL; in svcauth_null_accept()
769 svcauth_null_release(struct svc_rqst *rqstp) in svcauth_null_release() argument
771 if (rqstp->rq_client) in svcauth_null_release()
772 auth_domain_put(rqstp->rq_client); in svcauth_null_release()
773 rqstp->rq_client = NULL; in svcauth_null_release()
774 if (rqstp->rq_cred.cr_group_info) in svcauth_null_release()
775 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_null_release()
776 rqstp->rq_cred.cr_group_info = NULL; in svcauth_null_release()
793 svcauth_tls_accept(struct svc_rqst *rqstp) in svcauth_tls_accept() argument
795 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_tls_accept()
796 struct kvec *argv = rqstp->rq_arg.head; in svcauth_tls_accept()
797 struct kvec *resv = rqstp->rq_res.head; in svcauth_tls_accept()
804 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
811 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_tls_accept()
816 if (rqstp->rq_proc != 0) { in svcauth_tls_accept()
817 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
830 if (rqstp->rq_xprt->xpt_ops->xpo_start_tls) { in svcauth_tls_accept()
837 rqstp->rq_cred.cr_flavor = RPC_AUTH_TLS; in svcauth_tls_accept()
852 svcauth_unix_accept(struct svc_rqst *rqstp) in svcauth_unix_accept() argument
854 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_unix_accept()
855 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_unix_accept()
856 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_accept()
878 userns = (rqstp->rq_xprt && rqstp->rq_xprt->xpt_cred) ? in svcauth_unix_accept()
879 rqstp->rq_xprt->xpt_cred->user_ns : &init_user_ns; in svcauth_unix_accept()
894 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_unix_accept()
902 rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX; in svcauth_unix_accept()
906 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_accept()
911 svcauth_unix_release(struct svc_rqst *rqstp) in svcauth_unix_release() argument
915 if (rqstp->rq_client) in svcauth_unix_release()
916 auth_domain_put(rqstp->rq_client); in svcauth_unix_release()
917 rqstp->rq_client = NULL; in svcauth_unix_release()
918 if (rqstp->rq_cred.cr_group_info) in svcauth_unix_release()
919 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_unix_release()
920 rqstp->rq_cred.cr_group_info = NULL; in svcauth_unix_release()