Long SQL queries in attributes
    Pedro Ribeiro 
    pribeiro-bulk at net.ipl.pt
       
    Tue Nov 29 13:12:07 CET 2005
    
    
  
Hello freeradius-users,
  I'm having trouble using long (>253 chars) SQL queries in the
  "users" file.
  It seems the limitations of attribute size are being applied to
  SQL queries even before expanding %{...} variables.
  Example:
>DEFAULT NAS-Port-Type == 'Wireless-802.11', Service-Type == 'Login-User', Client-IP-Address != 127.0.0.1
>        IPLNet-VLAN = `%{sql:SELECT DISTINCT VLAN FROM alunos.RadiusVLAN AS v,alunos.Bindings AS b WHERE (Realm = '%{Realm}' OR Realm IS NULL) AND (HuntgroupName = '%{HuntgroupName}' OR HuntgroupName IS NULL) AND (User = SUBSTRING_INDEX('%{reply:User-Name}','@',1) AND Domain = '%{Realm}' AND v.CodigoCurso = b.CodigoCurso OR v.CodigoCurso IS NULL) ORDER BY v.CodigoCurso DESC,Realm DESC,HuntgroupName DESC LIMIT 1:-1003}`,
>        Fall-Through = Yes
  Is there any way to overcome this limitation ??
  TIA.
-- 
Best regards,
 Pedro                          mailto:pribeiro-bulk at net.ipl.pt
    
    
More information about the Freeradius-Users
mailing list