Missing feature in preparation for validating the MSCHAPv2 response, as
it was introduced in [1] later on.
1. https://github.com/paulusmack/ppp/commit/
7f7ea8967e3b02234811a4b9bb893fc21544319c
Signed-off-by: Tijs Van Buggenhout <tvbuggen@gmail.com>
#ifdef CHAPMS
#include "chap_ms.h"
#include "chap-new.h"
#ifdef CHAPMS
#include "chap_ms.h"
#include "chap-new.h"
+
+extern int chapms_strip_domain;
#endif /* CHAPMS */
eap_state eap_states[NUM_PPP]; /* EAP state; one for each unit */
#endif /* CHAPMS */
eap_state eap_states[NUM_PPP]; /* EAP state; one for each unit */
(remote_name[0] != '\0' && vallen == len))
strlcpy(rhostname, remote_name, sizeof (rhostname));
(remote_name[0] != '\0' && vallen == len))
strlcpy(rhostname, remote_name, sizeof (rhostname));
+ /* strip the MS domain name */
+ if (chapms_strip_domain && strrchr(rhostname, '\\')) {
+ char tmp[MAXNAMELEN+1];
+
+ strcpy(tmp, strrchr(rhostname, '\\') + 1);
+ strcpy(rhostname, tmp);
+ }
+
if (chap_verify_hook)
chap_verifier = chap_verify_hook;
else
if (chap_verify_hook)
chap_verifier = chap_verify_hook;
else