pairfind segmentation fault
Hi, i m writing a module2 for freeradius 2.1.10 on linux 2.6.18-194.el5PAE. this is the code: vp = pairfind(request->packet->vps,PW_USER_NAME); DEBUG("Found username = %s",vp->data.strvalue); // create and add the cleartext-password vp_clear_password = pairmake("Cleartext-password","smart",T_OP_SET); pairadd(&request->config_items, vp_clear_password); // create and add the callback-id vp = pairmake("callback-id","0702005010701059",T_OP_SET); pairadd(&request->reply->vps,vp); but the pairfind is giving segmentation fault: Program received signal SIGSEGV, Segmentation fault. 0x00b2879b in authorize (instance=0x8184460, request=0x81bbc68) at ../main.c:135 135 vp = pairfind(request->packet->vps,PW_USER_NAME); I have no idea what the problem is. What is the different between pairmake and radius_paircreate ? when am i supposed to use pairfree ? please let me know what the problem is. thanks!!
Juan Pablo L. wrote:
Hi, i m writing a module2 for freeradius 2.1.10 on linux 2.6.18-194.el5PAE. this is the code: ... I have no idea what the problem is.
See doc/bugs This list isn't the place to discuss debugging code you write.
What is the different between pairmake and radius_paircreate ?
The APIs are different. See the source.
when am i supposed to use pairfree ?
When you want to free the attribute. Alan DeKok.
participants (2)
-
Alan DeKok -
Juan Pablo L.