Lines Matching refs:rqstp
631 static struct group_info *unix_gid_find(kuid_t uid, struct svc_rqst *rqstp) in unix_gid_find() argument
636 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, in unix_gid_find()
642 ret = cache_check(sn->unix_gid_cache, &ug->h, &rqstp->rq_chandle); in unix_gid_find()
658 svcauth_unix_set_client(struct svc_rqst *rqstp) in svcauth_unix_set_client() argument
664 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client()
665 struct svc_xprt *xprt = rqstp->rq_xprt; in svcauth_unix_set_client()
669 switch (rqstp->rq_addr.ss_family) { in svcauth_unix_set_client()
671 sin = svc_addr_in(rqstp); in svcauth_unix_set_client()
676 sin6 = svc_addr_in6(rqstp); in svcauth_unix_set_client()
682 rqstp->rq_client = NULL; in svcauth_unix_set_client()
683 if (rqstp->rq_proc == 0) in svcauth_unix_set_client()
686 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_set_client()
689 ipm = __ip_map_lookup(sn->ip_map_cache, rqstp->rq_server->sv_program->pg_class, in svcauth_unix_set_client()
695 switch (cache_check(sn->ip_map_cache, &ipm->h, &rqstp->rq_chandle)) { in svcauth_unix_set_client()
705 rqstp->rq_client = &ipm->m_client->h; in svcauth_unix_set_client()
706 kref_get(&rqstp->rq_client->ref); in svcauth_unix_set_client()
711 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
725 rqstp->rq_auth_stat = rpc_auth_ok; in svcauth_unix_set_client()
732 svcauth_null_accept(struct svc_rqst *rqstp) in svcauth_null_accept() argument
734 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_null_accept()
735 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_null_accept()
736 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept()
743 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_null_accept()
748 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_null_accept()
763 rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL; in svcauth_null_accept()
768 svcauth_null_release(struct svc_rqst *rqstp) in svcauth_null_release() argument
770 if (rqstp->rq_client) in svcauth_null_release()
771 auth_domain_put(rqstp->rq_client); in svcauth_null_release()
772 rqstp->rq_client = NULL; in svcauth_null_release()
773 if (rqstp->rq_cred.cr_group_info) in svcauth_null_release()
774 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_null_release()
775 rqstp->rq_cred.cr_group_info = NULL; in svcauth_null_release()
792 svcauth_unix_accept(struct svc_rqst *rqstp) in svcauth_unix_accept() argument
794 struct kvec *argv = &rqstp->rq_arg.head[0]; in svcauth_unix_accept()
795 struct kvec *resv = &rqstp->rq_res.head[0]; in svcauth_unix_accept()
796 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_accept()
818 userns = (rqstp->rq_xprt && rqstp->rq_xprt->xpt_cred) ? in svcauth_unix_accept()
819 rqstp->rq_xprt->xpt_cred->user_ns : &init_user_ns; in svcauth_unix_accept()
834 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_unix_accept()
842 rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX; in svcauth_unix_accept()
846 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_accept()
851 svcauth_unix_release(struct svc_rqst *rqstp) in svcauth_unix_release() argument
855 if (rqstp->rq_client) in svcauth_unix_release()
856 auth_domain_put(rqstp->rq_client); in svcauth_unix_release()
857 rqstp->rq_client = NULL; in svcauth_unix_release()
858 if (rqstp->rq_cred.cr_group_info) in svcauth_unix_release()
859 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_unix_release()
860 rqstp->rq_cred.cr_group_info = NULL; in svcauth_unix_release()