Re: rlm_python: no %RAD_REQUEST equivalent

2012-09-27 Thread laurent . feron
Yes i confirm you cannot change the request's attributes with rlm_python. With 
rlm_perl you can (by using the environment variable RAD_REQUEST). I wanted to 
modify the username.

So the only solution would be to modify and update the rlm_python code source. 
But it is too hard for me...

regards,
Laurent


- Mail original -
De: "Alan DeKok" 
À: "FreeRadius users mailing list" 
Envoyé: Mardi 25 Septembre 2012 15:25:53
Objet: Re: rlm_python: no %RAD_REQUEST equivalent

laurent.fe...@free.fr wrote:
> The tuple is a read only object. So, i cannot modify the request attributes 
> with rlm_python.

  You already said that.  I gave you a solution: fix the code.

  Alan Dekok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: rlm_python: no %RAD_REQUEST equivalent

2012-09-25 Thread Alan DeKok
laurent.fe...@free.fr wrote:
> The tuple is a read only object. So, i cannot modify the request attributes 
> with rlm_python.

  You already said that.  I gave you a solution: fix the code.

  Alan Dekok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: rlm_python: no %RAD_REQUEST equivalent

2012-09-25 Thread laurent . feron
Hi,

Thanks for your reply.

The tuple is a read only object. So, i cannot modify the request attributes 
with rlm_python.

Unfortunately, this module is more limited than the perl one. i have to 
continue with this one...

Regards,
Laurent

- Mail original -
De: "Alan DeKok" 
À: "FreeRadius users mailing list" 
Envoyé: Lundi 24 Septembre 2012 18:06:03
Objet: Re: rlm_python: no %RAD_REQUEST equivalent

laurent.fe...@free.fr wrote:
> in the 'authorize(p)' function, p is the read only tuple of the request. I 
> cannot update the request here.

  Hmm... you should be able to update it.  If you can't, the code should
be changed.

> Moreover, if i change the tuple config in the authorize function , how i can 
> retrieve it in the authentication function?

  You get passed the tuple again.  It's just a list of attributes.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: rlm_python: no %RAD_REQUEST equivalent

2012-09-24 Thread Alan DeKok
laurent.fe...@free.fr wrote:
> in the 'authorize(p)' function, p is the read only tuple of the request. I 
> cannot update the request here.

  Hmm... you should be able to update it.  If you can't, the code should
be changed.

> Moreover, if i change the tuple config in the authorize function , how i can 
> retrieve it in the authentication function?

  You get passed the tuple again.  It's just a list of attributes.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


rlm_python: no %RAD_REQUEST equivalent

2012-09-24 Thread laurent . feron
Hello,

I have a perl module that changes the username during the authorization phase 
(retrieve from a oracle database) by modifying the user-name attribute in the 
RAD_REQUEST dictionary. This update is global and can be used by the 
authentication phase (still handled by the perl script).

I try to switch from perl to python as i'm more comfortable. Everything is ok 
except i don't know how to modify on the fly the user-name.

in the 'authorize(p)' function, p is the read only tuple of the request. I 
cannot update the request here.
The return of the function is (RLM_MODULE_something, tuple4reply, 
tuple4config). I still cannot change here.

Moreover, if i change the tuple config in the authorize function , how i can 
retrieve it in the authentication function?

Maybe i miss something as i'm a beginner on FR.

Regards,
Laurent
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html