Anyone want complex conditions in radiusd.conf?

Alan Dekok aland at deployingradius.com
Mon May 21 16:14:18 CEST 2007


 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



More information about the Freeradius-Devel mailing list