X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Flibtirpc.git;a=blobdiff_plain;f=src%2Fsvc_auth.c;h=31241c921d3200685bf3ee4ed6613605db7faece;hp=c6b3a0bd75f55497ba4d68ff17dc114207688822;hb=1b2274af88fc30a25f43be91e177cea041958e48;hpb=05e779c3a20dce57d28e3303a7b318d118902d51 diff --git a/src/svc_auth.c b/src/svc_auth.c index c6b3a0b..31241c9 100644 --- a/src/svc_auth.c +++ b/src/svc_auth.c @@ -82,9 +82,10 @@ static struct authsvc *Auths = NULL; * invalid. */ enum auth_stat -_authenticate(rqst, msg) +_gss_authenticate(rqst, msg, no_dispatch) struct svc_req *rqst; struct rpc_msg *msg; + bool_t *no_dispatch; { int cred_flavor; struct authsvc *asp; @@ -97,9 +98,10 @@ _authenticate(rqst, msg) rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor; rqst->rq_xprt->xp_verf.oa_length = 0; cred_flavor = rqst->rq_cred.oa_flavor; + *no_dispatch = FALSE; switch (cred_flavor) { - case AUTH_NULL: - dummy = _svcauth_null(rqst, msg); + case AUTH_NONE: + dummy = _svcauth_none(rqst, msg); return (dummy); case AUTH_SYS: dummy = _svcauth_unix(rqst, msg); @@ -112,6 +114,11 @@ _authenticate(rqst, msg) dummy = _svcauth_des(rqst, msg); return (dummy); #endif +#ifdef HAVE_RPCSEC_GSS + case RPCSEC_GSS: + dummy = _svcauth_gss(rqst, msg, no_dispatch); + return (dummy); +#endif default: break; } @@ -132,13 +139,11 @@ _authenticate(rqst, msg) return (AUTH_REJECTEDCRED); } -/*ARGSUSED*/ enum auth_stat -_svcauth_null(rqst, msg) - struct svc_req *rqst; - struct rpc_msg *msg; +_authenticate(struct svc_req *rqst, struct rpc_msg *msg) { - return (AUTH_OK); + bool_t no_dispatch; + return _gss_authenticate(rqst, msg, &no_dispatch); } /* @@ -170,6 +175,9 @@ svc_auth_reg(cred_flavor, handler) #ifdef DES_BUILTIN case AUTH_DES: #endif +#ifdef HAVE_RPCSEC_GSS + case RPCSEC_GSS: +#endif /* already registered */ return (1);