expiration module and reply items
Alan DeKok
aland at deployingradius.com
Fri Jun 4 09:26:07 CEST 2010
Ana Gallardo wrote:
> I'm working with freeradius 2.1.8 and I want to return an attribute when
> eexpiration module return 'userlock'.
>
> I try to add the item in expiration module:
....
> expiration {
> Reply-Message = "LA CUENTA HA EXPIRADO PARA
> %{%{Stripped-User-Name}:-%{User-Name}}"
> Codigo-Reject := Cuenta-Expirada
> }
>
> But it doesn't work.
Nothing in the documentation suggests that will work.
> I also try using unlang in authorize section:
>
> authorize {
>
> . . .
>
> expiration
> if (userlock){
> update reply {
> Codigo-Reject := Cuenta-Expirada
> }
> }
> pap
> }
That will work, with one minor change.
...
> ++[expiration] returns userlock
> }
> Using Post-Auth-Type Reject
Yes. Once the module returns "reject" or "userlock", the server stops
processing the section and returns. The solution is:
expiration {
userlock = 1
}
if (userlock) {
update reply {
Codigo-Reject := Curenta-Expirada
}
}
This is documented in doc/configurable_failover, and to a lesser
extent in "man unlang".
Alan DeKok.
More information about the Freeradius-Users
mailing list