New parsing of "unlang" conditions.

Alan DeKok aland at
Thu Apr 11 23:53:10 CEST 2013

A.L.M.Buxey at wrote:
> /etc/raddb/sites-enabled/default[67]: Invalid location for 'if'
> Errors reading or parsing /etc/raddb/radiusd.conf

  You don't have that in a "server" section.  That's why.

  I suggest fixing that.  The use of a bare "authorize" will get deleted
from the code before 3.0.  It was in 2.x *only* to be backwards
compatible with 1.x.  There's no longer any reason to use it.

> authorize {
>         preprocess
>         if (User-Name == "testuser" && Huntgroup-Name == "testNAS") {
>                 files {
>                         ok = return
>                         }
>         }
> thats the failed 'if' on line 67.... 

  The "if" parsing works fine once it's in a "server" section.

  The additional checks are there to catch people who do:

module {
	ldap {
		if (...) {




  It doesn't work, and it never has worked.  But until this change, it
loaded fine.  Fixing that is a Good Thing.

  Alan DeKok.

More information about the Freeradius-Devel mailing list