X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Feap.c;h=342d91f0897d341c4ddf6132c507cac2f67b1d97;hb=5191399f5266bb595f03f5c4fee13153092e2baf;hp=4daada7bb56cd67dea305ba30cf46f5f1bc18370;hpb=566ef9ef0a7be9c4f099d07846000adb825e0b7a;p=ppp.git diff --git a/pppd/eap.c b/pppd/eap.c index 4daada7..342d91f 100644 --- a/pppd/eap.c +++ b/pppd/eap.c @@ -82,6 +82,8 @@ #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 */ @@ -2545,6 +2547,14 @@ eap_response(eap_state *esp, u_char *inp, int id, int len) (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