{
if (SVC_RECV (xprt, &msg))
{
+ bool_t no_dispatch;
/* now find the exported program and call it */
struct svc_callout *s;
r.rq_proc = msg.rm_call.cb_proc;
r.rq_cred = msg.rm_call.cb_cred;
/* first authenticate the message */
- if ((why = _authenticate (&r, &msg)) != AUTH_OK)
+ why = _gss_authenticate(&r, &msg, &no_dispatch);
+ if (why != AUTH_OK)
{
svcerr_auth (xprt, why);
goto call_done;
}
+ if (no_dispatch)
+ goto call_done;
/* now match message with a registered service */
prog_found = FALSE;
low_vers = (rpcvers_t) - 1L;
* 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;
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_NONE:
dummy = _svcauth_none(rqst, msg);
case AUTH_DES:
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;
return (AUTH_REJECTEDCRED);
}
+enum auth_stat
+_authenticate(struct svc_req *rqst, struct rpc_msg *msg)
+{
+ bool_t no_dispatch;
+ return _gss_authenticate(rqst, msg, &no_dispatch);
+}
+
/*
* Allow the rpc service to register new authentication types that it is
* prepared to handle. When an authentication flavor is registered,
case AUTH_SHORT:
#ifdef DES_BUILTIN
case AUTH_DES:
+#endif
+#ifdef HAVE_RPCSEC_GSS
+ case RPCSEC_GSS:
#endif
/* already registered */
return (1);
enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *);
enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
+enum auth_stat _svcauth_gss (struct svc_req *, struct rpc_msg *, bool_t *);
__END_DECLS
#define AUTH_NONE 0 /* no authentication */
* Server side authenticator
*/
__BEGIN_DECLS
+extern enum auth_stat _gss_authenticate(struct svc_req *, struct rpc_msg *,
+ bool_t *);
extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *,
struct rpc_msg *));