Lines Matching refs:rqstp

642 static struct group_info *unix_gid_find(kuid_t uid, struct svc_rqst *rqstp)  in unix_gid_find()  argument
647 struct sunrpc_net *sn = net_generic(rqstp->rq_xprt->xpt_net, in unix_gid_find()
653 ret = cache_check(sn->unix_gid_cache, &ug->h, &rqstp->rq_chandle); in unix_gid_find()
669 svcauth_unix_set_client(struct svc_rqst *rqstp) in svcauth_unix_set_client() argument
675 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client()
676 struct svc_xprt *xprt = rqstp->rq_xprt; in svcauth_unix_set_client()
680 switch (rqstp->rq_addr.ss_family) { in svcauth_unix_set_client()
682 sin = svc_addr_in(rqstp); in svcauth_unix_set_client()
687 sin6 = svc_addr_in6(rqstp); in svcauth_unix_set_client()
693 rqstp->rq_client = NULL; in svcauth_unix_set_client()
694 if (rqstp->rq_proc == 0) in svcauth_unix_set_client()
697 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_set_client()
700 ipm = __ip_map_lookup(sn->ip_map_cache, rqstp->rq_server->sv_program->pg_class, in svcauth_unix_set_client()
706 switch (cache_check(sn->ip_map_cache, &ipm->h, &rqstp->rq_chandle)) { in svcauth_unix_set_client()
716 rqstp->rq_client = &ipm->m_client->h; in svcauth_unix_set_client()
717 kref_get(&rqstp->rq_client->ref); in svcauth_unix_set_client()
722 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
736 rqstp->rq_auth_stat = rpc_auth_ok; in svcauth_unix_set_client()
754 svcauth_null_accept(struct svc_rqst *rqstp) in svcauth_null_accept() argument
756 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_null_accept()
757 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept()
765 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_null_accept()
773 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_null_accept()
784 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_null_accept()
787 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_null_accept()
790 rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL; in svcauth_null_accept()
795 svcauth_null_release(struct svc_rqst *rqstp) in svcauth_null_release() argument
797 if (rqstp->rq_client) in svcauth_null_release()
798 auth_domain_put(rqstp->rq_client); in svcauth_null_release()
799 rqstp->rq_client = NULL; in svcauth_null_release()
800 if (rqstp->rq_cred.cr_group_info) in svcauth_null_release()
801 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_null_release()
802 rqstp->rq_cred.cr_group_info = NULL; in svcauth_null_release()
831 svcauth_tls_accept(struct svc_rqst *rqstp) in svcauth_tls_accept() argument
833 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_tls_accept()
834 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_tls_accept()
835 struct svc_xprt *xprt = rqstp->rq_xprt; in svcauth_tls_accept()
844 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
852 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_tls_accept()
857 if (rqstp->rq_proc != 0) { in svcauth_tls_accept()
858 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
870 p = xdr_reserve_space(&rqstp->rq_res_stream, XDR_UNIT * 2 + 8); in svcauth_tls_accept()
882 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_tls_accept()
886 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_tls_accept()
889 rqstp->rq_cred.cr_flavor = RPC_AUTH_TLS; in svcauth_tls_accept()
916 svcauth_unix_accept(struct svc_rqst *rqstp) in svcauth_unix_accept() argument
918 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_unix_accept()
919 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_accept()
946 userns = (rqstp->rq_xprt && rqstp->rq_xprt->xpt_cred) ? in svcauth_unix_accept()
947 rqstp->rq_xprt->xpt_cred->user_ns : &init_user_ns; in svcauth_unix_accept()
975 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_unix_accept()
979 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_unix_accept()
982 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_unix_accept()
985 rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX; in svcauth_unix_accept()
989 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_accept()
994 svcauth_unix_release(struct svc_rqst *rqstp) in svcauth_unix_release() argument
998 if (rqstp->rq_client) in svcauth_unix_release()
999 auth_domain_put(rqstp->rq_client); in svcauth_unix_release()
1000 rqstp->rq_client = NULL; in svcauth_unix_release()
1001 if (rqstp->rq_cred.cr_group_info) in svcauth_unix_release()
1002 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_unix_release()
1003 rqstp->rq_cred.cr_group_info = NULL; in svcauth_unix_release()