I am developping a module for freeradius. but i don't know how to get VPs from radcheck or radgroupcheck Later i maybe found one in rlm_checkval.c : checkval_instantiate (...){ ............ memset(&flags, 0, sizeof(flags)); dict_addattr(data->check_name, 0, PW_TYPE_STRING, -1,flags); dattr = dict_attrbyname(data->check_name); if (!dattr){ radlog(L_ERR, "rlm_checkval: No such attribute %s", data->check_name); checkval_detach(data); return -1; } data->chk_attr = dattr->attr; DEBUG2("rlm_checkval: Registered name %s for attribute %d", dattr->name,dattr->attr); } do_checkval(...) { tmp = request->config_items; do{ if (!(chk_vp = pairfind(tmp, data->chk_attr))){ if (!found){ DEBUG2("rlm_checkval: Could not find attribute named %s in check pairs",data->check_name); ret = RLM_MODULE_NOTFOUND; } break; } } This still doesn't work when i put my-defined Attribute in radcheck for one user : No XXX defined Is there any other API for this? Thank you!
westwood wrote:
I am developping a module for freeradius. but i don't know how to get VPs from radcheck or radgroupcheck
See src/lib/valuepair.c. The APIs are pretty simple.
Later i maybe found one in rlm_checkval.c :
No... that doesn't work.
This still doesn't work when i put my-defined Attribute in radcheck for one user : No XXX defined Is there any other API for this?
The server comes with dozens of modules which do all kinds of things. See rlm_example, rlm_files, or many other simple ones. Alan DeKok.
thank you ! The API i later found now works well after i change the position/order of my module in /sites-enable/default 2010/10/4 Alan DeKok <aland@deployingradius.com>
westwood wrote:
I am developping a module for freeradius. but i don't know how to get VPs from radcheck or radgroupcheck
See src/lib/valuepair.c. The APIs are pretty simple.
Later i maybe found one in rlm_checkval.c :
No... that doesn't work.
This still doesn't work when i put my-defined Attribute in radcheck for one user : No XXX defined Is there any other API for this?
The server comes with dozens of modules which do all kinds of things. See rlm_example, rlm_files, or many other simple ones.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
participants (2)
-
Alan DeKok -
westwood