Anyone want complex conditions in radiusd.conf?
Arran Cudbard-Bell
A.Cudbard-Bell at sussex.ac.uk
Mon May 21 22:13:32 CEST 2007
Alan Dekok wrote:
> authorize {
> ...
>
> if (("%{User-Name}" == "bob") || (5 > 3)) {
> sql
> detail
> ...
> }
>
> }
>
> Sound useful? :)
>
> The downside is that the existing checks in -pre0 for the return code
> of the previous module won't work e.g.
>
> if "handled|ok" {
> ...
>
> will now be broken. If this is OK, I'll check in the new code. With
> a little bit more work, I should be able to add the ability to check the
> return code of the modules, too.
>
> There are limitations, of course. The "if" condition has to fit all
> on one line, because the parser for "radiusd.conf" is very dumb. But it
> works for the tests I've come up with.
>
> Alan DeKok.
> --
> http://deployingradius.com - The web site of the book
> http://deployingradius.com/blog/ - The blog
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
>
Yes this is a far better way of doing things !!
Could you use regexp in conditions ?
And could you make them work in instantiate as well as authorize ?
--
Arran
More information about the Freeradius-Devel
mailing list