Re: A question about rlm modules

2007-10-27 Thread Ali Majdzadeh
Hello Alan Thanks for your reply. Would you please tell me whether the scenario is correct or not? 1) We obtain the clear text password in the authorization section of our module. 2) We populate the request-config_items with the clear text password. 3) The CHAP module authenticates the user using

Re: A question about rlm modules

2007-10-27 Thread Alan DeKok
Ali Majdzadeh wrote: Would you please tell me whether the scenario is correct or not? 1) We obtain the clear text password in the authorization section of our module. 2) We populate the request-config_items with the clear text password. 3) The CHAP module authenticates the user using the

A question about rlm modules

2007-10-25 Thread Ali Majdzadeh
Hello all I have written an rlm_module. It works fine. Here, we have clients which should be authenticated using CHAP passwords. In the radiusd.conf, I have mentioned my module before the CHAP module in the authentication section. Also, I have found that my module should populate the

Re: A question about rlm modules

2007-10-25 Thread Alan DeKok
Ali Majdzadeh wrote: I have written an rlm_module. It works fine. Here, we have clients which should be authenticated using CHAP passwords. In the radiusd.conf, I have mentioned my module before the CHAP module in the authentication section. Also, I have found that my module should populate the

Re: A question about rlm modules

2007-10-25 Thread Ali Majdzadeh
Hello Alan Yes, I am sure that the code works correctly, because the CHAP module accepts the clear text password which I have provided in the request-config_items. Below is my code for the authorize section of the module: static int netbill_authorize (void *instance, REQUEST *request) {

Re: A question about rlm modules

2007-10-25 Thread Alan DeKok
Ali Majdzadeh wrote: Hello Alan Yes, I am sure that the code works correctly, because the CHAP module accepts the clear text password which I have provided in the request-config_items. Below is my code for the authorize section of the module: That looks OK. Thu Oct 25 13:18:42 2007 :

Question about rlm modules

2006-10-29 Thread Ali Majdzadeh
Hi allIs it possible to send Vendor Specific Attributes through an rlm module?I use the following method to send standard attributes through an rlm module:(As suggested by the template itself) reply = pairmake (User-Name, root, T_OP_EQ);pairadd (request-reply-vps, reply);request-reply-code =

Re: Question about rlm modules

2006-10-29 Thread Alan DeKok
Ali Majdzadeh [EMAIL PROTECTED] wrote: (As suggested by the template itself) * *reply = pairmake (User-Name, root, T_OP_EQ); pairadd (request-reply-vps, reply); request-reply-code = PW_USER_NAME; No, that last line is wrong. Completely and totally wrong. No template or examples suggests

Question about rlm modules

2006-09-12 Thread Ali Majdzadeh
Hi allWhat is(are) the coresponding function pointer(s) for start and stop packets in an rlm module? (Something like xxx_authenticate)Should I define my own custome funtion pointers? Then, How can I test them? Best RegardsAli - List info/subscribe/unsubscribe? See

RE: Question about rlm modules

2006-09-12 Thread Shankar Ganesh C
Hi Ali, Could you let me know how did u capture the vendor specfic attributes in the rlm_module ? like the one you have described earlier getenv(USER_NAME) , getnev(Cisco_AVP) ? Rgds, Shankar ganesh -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On

Re: Question about rlm modules

2006-09-12 Thread Ali Majdzadeh
Hi ShankarYes, of course.code:char USER_NAME[128];VALUE_PAIR *vp_iterator;vp_iterator = request-packet-vps;while (vp_iterator){ if (strcmp (vp_iterator-name, User-Name) == 0) strcpy (USER_NAME, vp_iterator-strvalue); vp_iterator = vp_iterator-next;}This method also works for vendor specific

Re: Question about rlm modules

2006-09-12 Thread Ali Majdzadeh
Hi againBy the way, the better approach to catch attributes' values is through the usage of the following function:vp_prints_value(char *out, int outlen, VALUE_PAIR *vp,int delimitst);RegardsAli On 9/12/06, Ali Majdzadeh [EMAIL PROTECTED] wrote: Hi ShankarYes, of course.code:char

Re: Question about rlm modules

2006-09-12 Thread Alan DeKok
Shankar Ganesh C [EMAIL PROTECTED] wrote: Could you let me know how did u capture the vendor specfic attributes in the rlm_module ? Read the source code to rlm_files. VSA's are just normal attributes. You can refer to them by name. Alan DeKok. -- http://deployingradius.com - The

Re: Question about rlm modules

2006-09-12 Thread Alan DeKok
Ali Majdzadeh [EMAIL PROTECTED] wrote: What is(are) the coresponding function pointer(s) for start and stop packets in an rlm module? (Something like xxx_authenticate) The accounting sections handle accounting packets. Alan DeKok. -- http://deployingradius.com - The web site of the