Imported Upstream version 0.2.5
[platform/upstream/libtirpc.git] / src / svc_auth.c
index c6b3a0b..31241c9 100644 (file)
@@ -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);