elsif((("%{Supplicant-Flags}" == "")||("%{Supplicant-Flags}" =~ /^10........$/)) && ("%{Pre-Proxy-Realm}" == "sussex.ac.uk")){ update config { Autz-Type := "soft-ban" } } generates ++? elsif ((("%{Supplicant-Flags}" == "")||("%{Supplicant-Flags}" =~ /^10........$/)) && ("%{Pre-Proxy-Realm}" == "sussex.ac.uk")) radius_xlat: '0000000000' ??? Evaluating ("%{Supplicant-Flags}" == "") -> FALSE radius_xlat: '0000000000' ??? Evaluating ("%{Supplicant-Flags}" =~ /^10........$/) -> FALSE ?? Skipping ("%{Pre-Proxy-Realm}" == "sussex.ac.uk") ++? elsif ((("%{Supplicant-Flags}" == "")||("%{Supplicant-Flags}" =~ /^10........$/)) && ("%{Pre-Proxy-Realm}" == "sussex.ac.uk")) -> TRUE So it's evaluated the zero length condition found it to be false evaluated Supplicant-Flags regex found it to be false. Skipped the && and should return false but instead returns true. Also leaving Autz-Type module{ } Empty results in "Bus error" If the requests hits one, and the process dies, Might be good to check when parsing the config file for empty Autz-Type declarations . Though it's a very minor issue. -- Arran Cudbard-Bell (A.Cudbard-Bell@sussex.ac.uk) Authentication, Authorisation and Accounting Officer Infrastructure Services | ENG1 E1-1-08 University Of Sussex, Brighton EXT:01273 873900 | INT: 3900
Arran Cudbard-Bell wrote:
elsif((("%{Supplicant-Flags}" == "")||("%{Supplicant-Flags}" =~ /^10........$/)) && ("%{Pre-Proxy-Realm}" == "sussex.ac.uk")){
Ok. The nested brackets don't seem to be handled well. I'll see if I can fix it tomorrow.
Also leaving Autz-Type module{ }
Empty results in
"Bus error"
That would appear to be a bug. Alan DeKok.
Arran Cudbard-Bell wrote: ...
So it's evaluated the zero length condition found it to be false evaluated Supplicant-Flags regex found it to be false.
Skipped the &&
and should return false
but instead returns true.
Fixed.
Also leaving Autz-Type module{ }
Empty results in
"Bus error"
Fixed.
If the requests hits one, and the process dies,
Might be good to check when parsing the config file for empty Autz-Type declarations .
We can add a warning message, but empty sections shouldn't cause problems. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (2)
-
Alan Dekok -
Arran Cudbard-Bell