[389-devel] Please review: [Bug 504383] PCRE breaks SASL Mapping

Noriko Hosoi nhosoi at redhat.com
Tue Jun 23 21:29:21 UTC 2009


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 at redhat.com
        ReportedBy: rmeggins at redhat.com
         QAContact: ckannan at redhat.com
                CC: nkinder at 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-504383-PCRE-breaks-SASL-Mapping.patch
Type: text/x-patch
Size: 1897 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090623/bdf436ec/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3250 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090623/bdf436ec/attachment-0001.bin>


More information about the Fedora-directory-devel mailing list