Bluehost.com Web Hosting $6.95

Re: [SOLVED] CHAP Modification

This is a discussion on Re: [SOLVED] CHAP Modification within the FreeRADIUS Users forums, part of the Networking and Network Related category; Alan DeKok-4 wrote: > > ChristosH wrote: >> It's a VALUE_PAIR type, so could I check and ...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2007
ChristosH
 
Posts: n/a
Default Re: [SOLVED] CHAP Modification




Alan DeKok-4 wrote:
>
> ChristosH wrote:
>> It's a VALUE_PAIR type, so could I check and modify the password->length
>> and
>> password->strvalue in that function?

>
> Huh? Why? Do it elsewhere.
>


Well, that's part of my issue; where's the best place to check the password
and convert it to binary when needed.

In the rlm_chap.C file I also notice that there's the code:

DEBUG(" rlm_chap: Using clear text password \"%s\" for user %s
authentication.",
passwd_item->strvalue, request->username->strvalue);


rad_chap_encode(request->packet,pass_str,request->password->strvalue[0],passwd_item);

if (memcmp(pass_str+1,request->password->strvalue+1,CHAP_VALUE_LENGTH) !=
0){
DEBUG(" rlm_chap: Password check failed");
snprintf(module_fmsg,sizeof(module_fmsg),"rlm_chap : Wrong user password");
module_fmsg_vp = pairmake("Module-Failure-Message", module_fmsg, T_OP_EQ);
pairadd(&request->packet->vps, module_fmsg_vp);
return RLM_MODULE_REJECT;
}

Could I also modify the password there? I'm just trying to find the easiest
way to check if the password should be read as a string or binary and then
parse it properly BEFORE it is CHAP encoded because I can't change the
hardware.
> Also, is there a C function included in the libraries that will allow me
> to
> convert a hex string to binary? I'm worried I might get stuck in ASCII ->
> HEX -> BINARY conversions.


Yes. see "bin2hex" and "hex2bin". See also rlm_pap in 1.1.4, which
does a lot of this kind of normalization already.

Alan DeKok.
--
http://deployingradius.com - The web site of the book
http://deployingradius.com/blog/ - The blog
-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html



--
View this message in context: http://www.nabble.com/CHAP-Modificat....html#a9207275
Sent from the FreeRadius - User mailing list archive at Nabble.com.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:57 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0