Case-insensitive regexps in rlm_files
    Alan DeKok 
    aland at deployingradius.com
       
    Fri Nov 19 17:00:16 CET 2010
    
    
  
Brian Candler wrote:
> (2) Set case-insensitive flag on the value
> 
> * Parse /xxx/ and /xxx/i as a PW_STRING containing xxx
> * Add new flag 'case_insensitive' to attr_flags
> * Use this flag when calling regcomp
  <sigh>  That's probably better...
> Advantages:
> - changes parser, but otherwise touches relatively little code
> - gives the expected user syntax for regexps
> 
> Disadvantages:
> - technically this is an incompatible change for existing configs with
>   User-Name == /foo/, which would have to change to User-Name == "/foo/"
  ?  /foo/ isn't supported right now.  So that won't cause any change.
> As a separate point, I think it's possible to cache the regcomp when do_xlat
> is not set.  This would require another field in struct value_pair (to avoid
> changing strvalue into a struct).  Worthwhile?
  No.  That structure is already too big.
  Alan DeKok.
    
    
More information about the Freeradius-Users
mailing list