The regexp will not compile with just 2 backslashes it seems to translate \\ to \ (correct) and then escapes out the following ] (not correct) Things do work however with 4 backslashes \\\\ in the policy.d configuration and oddly enough it also works with 3 backslashes \\\ … am I missing something here as to how correct_escapes is supposed to function? This isn’t really an issue as I can make it work and get the expected behavior. with correct_escapes = true In policy.d file: simple_nt_regexp = "^([^\\]*)\\(.*)$” In radiusd -X output: /etc/raddb/policy.d/strip-user-domain[9]: Invalid regular expression: /etc/raddb/policy.d/strip-user-domain[9]: ^([^\]*)\(.*)$ /etc/raddb/policy.d/strip-user-domain[9]: ^ Pattern compilation failed: missing terminating ] for character class
On Mar 6, 2015, at 10:08 AM, FreeRadius developers mailing list <freeradius-devel@lists.freeradius.org> wrote:
On Mar 6, 2015, at 3:11 AM, Phil Mayers <p.mayers@imperial.ac.uk> wrote:
On 5 March 2015 17:40:51 GMT+00:00, Aaron Hurt via Freeradius-Devel <freeradius-devel@lists.freeradius.org> wrote:
When old style domain names come into FR they seem to always contain two backslashes ‘DOMAIN\\username’ That's just a printout escaping thing in debugging. It's really one \ in the packet, and thus \\ is sufficient to match it in the regex with correct escapes set to true.
Good to know, thank you.
-- Sent from my mobile device, please excuse brevity and typos - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html