String Validation
Michael Bryant
michael.bryant at sjc.ox.ac.uk
Sun Aug 16 14:34:17 CEST 2009
The if statement can remain the same, add before it:
if (SQL-GROUP =~ /(.*)-.*/) {
update request {
SQL-GROUP := "%{1}"
}
}
This assumes that:
a) There is never a '-' in the USUK or whatever part.
b) You don't need to reference the original SQL-GROUP value.
If you do, you may want to use something like:
if (SQL-GROUP =~ /(.*)-.*/) {
update control {
Tmp-String-0 := "%{1}"
}
}
if(control:Tmp-String-0 == "USUK") {
ok
}
etc.
--Mike
More information about the Freeradius-Users
mailing list