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()
701 rqstp->rq_server->sv_programs->pg_class, in svcauth_unix_set_client()
707 switch (cache_check(sn->ip_map_cache, &ipm->h, &rqstp->rq_chandle)) { in svcauth_unix_set_client()
717 rqstp->rq_client = &ipm->m_client->h; in svcauth_unix_set_client()
718 kref_get(&rqstp->rq_client->ref); in svcauth_unix_set_client()
723 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
737 rqstp->rq_auth_stat = rpc_auth_ok; in svcauth_unix_set_client()
755 svcauth_null_accept(struct svc_rqst *rqstp) in svcauth_null_accept() argument
757 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_null_accept()
758 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept()
766 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_null_accept()
774 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_null_accept()
785 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_null_accept()
788 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_null_accept()
791 rqstp->rq_cred.cr_flavor = RPC_AUTH_NULL; in svcauth_null_accept()
796 svcauth_null_release(struct svc_rqst *rqstp) in svcauth_null_release() argument
798 if (rqstp->rq_client) in svcauth_null_release()
799 auth_domain_put(rqstp->rq_client); in svcauth_null_release()
800 rqstp->rq_client = NULL; in svcauth_null_release()
801 if (rqstp->rq_cred.cr_group_info) in svcauth_null_release()
802 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_null_release()
803 rqstp->rq_cred.cr_group_info = NULL; in svcauth_null_release()
832 svcauth_tls_accept(struct svc_rqst *rqstp) in svcauth_tls_accept() argument
834 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_tls_accept()
835 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_tls_accept()
836 struct svc_xprt *xprt = rqstp->rq_xprt; in svcauth_tls_accept()
845 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
853 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_tls_accept()
858 if (rqstp->rq_proc != 0) { in svcauth_tls_accept()
859 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_tls_accept()
871 p = xdr_reserve_space(&rqstp->rq_res_stream, XDR_UNIT * 2 + 8); in svcauth_tls_accept()
883 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_tls_accept()
887 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_tls_accept()
890 rqstp->rq_cred.cr_flavor = RPC_AUTH_TLS; in svcauth_tls_accept()
917 svcauth_unix_accept(struct svc_rqst *rqstp) in svcauth_unix_accept() argument
919 struct xdr_stream *xdr = &rqstp->rq_arg_stream; in svcauth_unix_accept()
920 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_accept()
947 userns = (rqstp->rq_xprt && rqstp->rq_xprt->xpt_cred) ? in svcauth_unix_accept()
948 rqstp->rq_xprt->xpt_cred->user_ns : &init_user_ns; in svcauth_unix_accept()
976 rqstp->rq_auth_stat = rpc_autherr_badverf; in svcauth_unix_accept()
980 if (xdr_stream_encode_opaque_auth(&rqstp->rq_res_stream, in svcauth_unix_accept()
983 if (!svcxdr_set_accept_stat(rqstp)) in svcauth_unix_accept()
986 rqstp->rq_cred.cr_flavor = RPC_AUTH_UNIX; in svcauth_unix_accept()
990 rqstp->rq_auth_stat = rpc_autherr_badcred; in svcauth_unix_accept()
995 svcauth_unix_release(struct svc_rqst *rqstp) in svcauth_unix_release() argument
999 if (rqstp->rq_client) in svcauth_unix_release()
1000 auth_domain_put(rqstp->rq_client); in svcauth_unix_release()
1001 rqstp->rq_client = NULL; in svcauth_unix_release()
1002 if (rqstp->rq_cred.cr_group_info) in svcauth_unix_release()
1003 put_group_info(rqstp->rq_cred.cr_group_info); in svcauth_unix_release()
1004 rqstp->rq_cred.cr_group_info = NULL; in svcauth_unix_release()