summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2023-03-18 10:22:33 +1100
committerGitHub <noreply@github.com>2023-03-18 10:22:33 +1100
commit575895559032fc7b7ade78bc5b3afb2feb1794c3 (patch)
tree28173d7ef194ac0ff6eae9a841c0b8e2e36a5a69
parent3ffe2ef6a8f0ccf68c1656347595e1df81c5bb20 (diff)
parentef95263d74a26edf08061b940db722189b441e9c (diff)
downloadppp-575895559032fc7b7ade78bc5b3afb2feb1794c3.tar.gz
Merge pull request #409 from enaess/conf-fixes
Additional fixes for various configure options (less frequently used) that broke
-rw-r--r--pppd/chap_ms.c11
-rw-r--r--pppd/options.c6
-rw-r--r--pppd/plugins/radius/radius.c2
3 files changed, 12 insertions, 7 deletions
diff --git a/pppd/chap_ms.c b/pppd/chap_ms.c
index 6b2a026..e3d808f 100644
--- a/pppd/chap_ms.c
+++ b/pppd/chap_ms.c
@@ -654,11 +654,12 @@ ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len,
BZERO(UcasePassword, sizeof(UcasePassword));
for (i = 0; i < secret_len; i++)
UcasePassword[i] = (u_char)toupper(secret[i]);
- (void) DesSetkey(UcasePassword + 0);
- DesEncrypt( StdText, PasswordHash + 0 );
- (void) DesSetkey(UcasePassword + 7);
- DesEncrypt( StdText, PasswordHash + 8 );
- ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]);
+
+ if (DesEncrypt(StdText, UcasePassword + 0, PasswordHash + 0) &&
+ DesEncrypt(StdText, UcasePassword + 7, PasswordHash + 8)) {
+
+ ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]);
+ }
}
#endif
diff --git a/pppd/options.c b/pppd/options.c
index 214adae..42e39b8 100644
--- a/pppd/options.c
+++ b/pppd/options.c
@@ -452,9 +452,11 @@ ppp_get_path(ppp_path_t type, char *buf, size_t bufsz)
case PPP_DIR_RUNTIME:
path = PPP_PATH_VARRUN;
break;
+#ifdef PPP_WITH_PLUGINS
case PPP_DIR_PLUGIN:
path = PPP_PATH_PLUGIN;
break;
+#endif
case PPP_DIR_CONF:
path = PPP_PATH_CONFDIR;
break;
@@ -477,10 +479,12 @@ ppp_get_filepath(ppp_path_t type, const char *name, char *buf, size_t bufsz)
case PPP_DIR_RUNTIME:
path = PPP_PATH_VARRUN;
break;
+#ifdef PPP_WITH_PLUGINS
case PPP_DIR_PLUGIN:
path = PPP_PATH_PLUGIN;
break;
- case PPP_DIR_CONF:
+#endif
+ case PPP_DIR_CONF:
path = PPP_PATH_CONFDIR;
break;
}
diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c
index 11cf27c..c73ca0b 100644
--- a/pppd/plugins/radius/radius.c
+++ b/pppd/plugins/radius/radius.c
@@ -44,9 +44,9 @@ static char const RCSID[] =
#include <pppd/chap_ms.h>
#ifdef PPP_WITH_MPPE
#include <pppd/mppe.h>
-#include <pppd/crypto.h>
#endif
#endif
+#include <pppd/crypto.h>
#include <pppd/fsm.h>
#include <pppd/ipcp.h>