Modifying User-Name and User-Password attributes in a module
Arash Yadegarnia
arash at bluehome.net
Wed Apr 9 15:08:27 CEST 2008
Hi,
I've been working on a freeradius module which will operate in pre-proxy
and post-proxy mode. I need to modify the user-password
(PW_USER_PASSWORD) attribute in pre-proxy and return an RLM_MODULE_UPDATED.
My first question is, Do I only need to update the user-password
attribute in proxy packet ? or I also have to update user-password vp in
packet structure ? I mean
vp = pairfind (request->packet->vps, PW_USER_PASSWORD);
Also, what are those "username" and "password" value pairs in main
request structure ?
AFAIK, they're not just pointers to values in packet, proxy, reply and
proxy_reply. Do I have to update them too ?
And last question, Is it safe to modify the Proxy-State attribute in
pre-proxy stage? somewhere in event.c, the comments says that, RFC
requires it (Proxy-State) but freeradius doesn't need it, and just
fills it with packet->id (which is a random number). Since RFC forbids
adding more than one Proxy-State too the packet, and also having in mind
that I don't want to introduce a new attribute (bothering dictionary
files), Can I use the same Proxy-State (filed by freeradius with
packet->id) to store my own data in it ?
Thanks,
More information about the Freeradius-Devel
mailing list