Script started on Thu 07 Apr 2011 02:49:02 PM CDT
]2;johnh@raddai2:...erver-2.1.10-debug]1;raddai2johnh@raddai2:~/Projects/freeradius-server-2.1.10-debug> diff $M1/rlm_mschap.c ..
./freeradius-server-2.1.10/$M1/rlm_mschap.c
1242,1252c1242
< /* JCH - changes to include challenge and message */
<                         char msg[100];
<                         strcpy(msg, "E=691 R=0 C=");
<                         int i, offset = strlen(msg);
<                         char *ptr = &msg[offset];
<                         for (i=0; i<16; i++, ptr+=2) {
<                            sprintf(ptr, "%02X", response->vp_octets[i+2]);
<                         }
<                         *ptr = 0;
<                         strcat(msg, " V=3 M=May Need to reset cashed password");
<              		mschap_add_reply(request, &request->reply->vps,
---
> 			mschap_add_reply(request, &request->reply->vps,
1254c1244
< 					 "MS-CHAP-Error", msg, strlen(msg));
---
> 					 "MS-CHAP-Error", "E=691 R=1", 9);
1299d1288
< /* JCH should we check for MS-CHAPV2 and modify the reply to include challenge? */
]2;johnh@raddai2:...erver-2.1.10-debug]1;raddai2johnh@raddai2:~/Projects/freeradius-server-2.1.10-debug> echo $M2
src/modules/rlm_eap/types/rlm_eap_mschapv2
]2;johnh@raddai2:...erver-2.1.10-debug]1;raddai2johnh@raddai2:~/Projects/freeradius-server-2.1.10-debug> diff $M2/rlm_eap_mschap 
v2.c ../freeradius-server-2.1.10/$M2/rlm_eap_mschapv2.c
198,200c198
< /* JCH need to be change length to work with full v2 message  */
< 		//length = 4 + MSCHAPV2_FAILURE_MESSAGE_LEN;
<                 length = 4 + reply->length-1;
---
> 		length = 4 + MSCHAPV2_FAILURE_MESSAGE_LEN;
217,222c215
< /* JCH need to copy the failure message from mschapv2 - it contains ascii
<    version of the challenge C=...
< */
< 		memcpy((eap_ds->request->type.data + 4), (reply->vp_strvalue+1),
<                     (reply->length-1));
< //MSCHAPV2_FAILURE_MESSAGE, MSCHAPV2_FAILURE_MESSAGE_LEN);
---
> 		memcpy((eap_ds->request->type.data + 4), MSCHAPV2_FAILURE_MESSAGE, MSCHAPV2_FAILURE_MESSAGE_LEN);
495,505d487
< /*JCH added - is this is an ack of a failure message */
<         case PW_EAP_MSCHAPV2_FAILURE: 
< 		if (data->code != PW_EAP_MSCHAPV2_FAILURE) {
< 			radlog(L_ERR, "rlm_eap_mschapv2: Unexpected FAILURE received");
< 			return 0;
< 		}
< 		//JCH needed??? handler->request->options &= ~RAD_REQUEST_OPTION_PROXY_EAP;
<                 eap_ds->request->code = PW_EAP_FAILURE;
<                 return 1;
<                 break;
< 
677,680d658
<                 /* JCH this is in response to the failure ack - return
<                    failure packet - don't return yet need to send
<                  */
< 
682c660,662
< 		pairmove2(&response, &handler->request->reply->vps,
---
> 		return 1;
> #if 0
> 		pairmove2(&handler->request->reply->vps, &response
684a665
> #endif
]2;johnh@raddai2:...erver-2.1.10-debug]1;raddai2johnh@raddai2:~/Projects/freeradius-server-2.1.10-debug> exit

Script done on Thu 07 Apr 2011 02:51:11 PM CDT
