Summary: PCRE breaks SASL Mapping
https://bugzilla.redhat.com/show_bug.cgi?id=504383
Summary: PCRE breaks SASL Mapping
Product: 389
Version: 1.2.1
Platform: All
OS/Version: Linux
Status: NEW
Severity: high
Priority: high
Component: Directory Server
AssignedTo: nhosoi(a)redhat.com
ReportedBy: rmeggins(a)redhat.com
QAContact: ckannan(a)redhat.com
CC: nkinder(a)redhat.com
Blocks: 434915,495079
Estimated Hours: 0.0
Classification: Other
Target Release: ---
[Description of the problem]
The old regex code used \( \) to indicate grouping for use with \& and \1, \2,
etc. PCRE uses () instead. When you upgrade to a directory server that uses
PCRE, the sasl mapping code will look for literal '(' and ')' in the
pattern
and will fail.
I'm not sure what the best way to handle this is.
1) When reading the sasl mapping config, we could just convert \( and \) to (
and ), and write the fixes back out to the config. That is probably the
easiest way to handle upgrades.
2) Have setup -u go in and fix all of the configs.
1) is probably simpler, but might cause confusion if someone really did have a
( in a pattern, and really did want to match a literal '(' character.
[Fix Description]
I chose the first suggestion by Rich 1).
When getting a regular expression from the config file for sasl mapping, unescape
parenthesis in the regular expression.
E.g., ^u:\(.*\) ==> ^u:(.*)
This unescape is necessary for the new regex code using PCRE
to keep the backward compatibility.