I am developping a module for freeradius. but i don't know how to get VPs from radcheck or radgroupcheck <br>Later i maybe found one in rlm_checkval.c :<br>checkval_instantiate (...){<br> ............<br> memset(&flags, 0, sizeof(flags));<br>
dict_addattr(data->check_name, 0, PW_TYPE_STRING, -1,flags);<br> dattr = dict_attrbyname(data->check_name);<br> if (!dattr){<br> radlog(L_ERR, "rlm_checkval: No such attribute %s",<br> data->check_name);<br>
checkval_detach(data);<br> return -1;<br> }<br> data->chk_attr = dattr->attr;<br> DEBUG2("rlm_checkval: Registered name %s for attribute %d",<br> dattr->name,dattr->attr);<br>
}<br><br><br>do_checkval(...)<br>{<br>tmp = request->config_items;<br> do{<br> if (!(chk_vp = pairfind(tmp, data->chk_attr))){<br> if (!found){<br> DEBUG2("rlm_checkval: Could not find attribute named %s in check pairs",data->check_name);<br>
ret = RLM_MODULE_NOTFOUND;<br> }<br> break;<br> }<br>}<br><br>This still doesn't work when i put my-defined Attribute in radcheck for one user : No XXX defined<br>Is there any other API for this?<br>
Thank you!<br>