From bf8f0b82df20eb70cca557b4c8bc42b00b0ab73f Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Thu, 12 Dec 2019 11:14:19 -0500 Subject: Add back the authdes interfaces Instead of compiling out the authdes interfaces as commit d918e41d8 did, add them back but they will fail if called. Signed-off-by: Steve Dickson --- src/rpc_soc.c | 18 ++++++++++++++++++ src/svc_auth.c | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/rpc_soc.c b/src/rpc_soc.c index 76e4376..ac7d312 100644 --- a/src/rpc_soc.c +++ b/src/rpc_soc.c @@ -595,6 +595,24 @@ authdes_pk_create(servername, pkey, window, syncaddr, ckey) fallback: return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL); } +#else +AUTH * +authdes_create(servername, window, syncaddr, ckey) + char *servername; /* network name of server */ + u_int window; /* time to live */ + struct sockaddr *syncaddr; /* optional hostaddr to sync with */ + des_block *ckey; /* optional conversation key to use */ +{ return (NULL); } + +AUTH * +authdes_pk_create(servername, pkey, window, syncaddr, ckey) + char *servername; /* network name of server */ + netobj *pkey; /* public key */ + u_int window; /* time to live */ + struct sockaddr *syncaddr; /* optional hostaddr to sync with */ + des_block *ckey; /* optional conversation key to use */ +{ return (NULL); } + #endif diff --git a/src/svc_auth.c b/src/svc_auth.c index 66a52e4..ce8bbd8 100644 --- a/src/svc_auth.c +++ b/src/svc_auth.c @@ -114,10 +114,12 @@ _gss_authenticate(rqst, msg, no_dispatch) case AUTH_SHORT: dummy = _svcauth_short(rqst, msg); return (dummy); -#ifdef AUTHDES_SUPPORT case AUTH_DES: +#ifdef AUTHDES_SUPPORT dummy = _svcauth_des(rqst, msg); return (dummy); +#else + return (AUTH_FAILED); #endif #ifdef HAVE_RPCSEC_GSS case RPCSEC_GSS: @@ -178,6 +180,9 @@ svc_auth_reg(cred_flavor, handler) case AUTH_SYS: case AUTH_SHORT: case AUTH_DES: +#ifndef AUTHDES_SUPPORT + return(-1); +#endif #ifdef HAVE_RPCSEC_GSS case RPCSEC_GSS: #endif -- cgit v1.2.1