[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: New substring matching rule (ITS#3041)
--Boundary-00=_/08lA/HqUu6p165
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Le lundi 29 Mars 2004 23:24, vous avez =E9crit=A0:
> At 08:11 AM 3/29/2004, alexandre.pauzies@linagora.com wrote:
> >Le vendredi 26 Mars 2004 17:55, Kurt D. Zeilenga a =E9crit :
> >> Without a formal technical specification (e.g., an RFC), your
> >> new rule addition is likely will not be accepted.
>
> This is my key point.
>
> If anything, the addition of only a substring rule confused me
> (instead of addition of a set of similar equality, ordering, and
> substrings matching rules). It makes little sense to me to add a
> new substring rule in absence of an equality rule of like semantics.
>
> But these confusion on this or other aspects of your submission
> seem beyond my key point. That is, I think a technical specification
> is needed here.
>
> Kurt
Hi,
I have tried to write the technical specification you've requested, made a=
=20
version of this patch for openldap-2.2 and added the missing equality and=20
ordering matching rules.
I hope this could be useful.
Alexandre.
=2D-=20
Alexandre Pauzi=E8s <alexandre.pauzies@linagora.com>
LINAGORA - Soci=E9t=E9 de services en Logiciels Libres
http://www.linagora.com/ - T=E9l: 01.58.18.68.28
--Boundary-00=_/08lA/HqUu6p165
Content-Type: text/plain;
charset="iso-8859-1";
name="draft-pauzies-ldap-schema-nonascii-mr-00.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="draft-pauzies-ldap-schema-nonascii-mr-00.txt"
Network Working Group A. Pauzies
Internet-Draft LINAGORA
Expires: October 22, 2004 April 23, 2004
LDAP: Additional Matching Rules
draft-pauzies-ldap-schema-nonascii-mr-00
Status of this Memo
By submitting this Internet-Draft, I certify that any applicable
patent or other IPR claims of which I am aware have been disclosed,
and any of which I become aware will be disclosed, in accordance with
RFC 3668.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http://
www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on October 22, 2004.
Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved.
Abstract
This document provides a collection of matching rules for use with
the Lightweight Directory Access Protocol (LDAP). Thoses matching
rules are simple adaptations of existing LDAP matching rules allowing
a more flexible match on non-ASCII strings.
Pauzies Expires October 22, 2004 [Page 1]
Internet-Draft LDAP: Additional Matching Rules April 2004
Table of Contents
1. Background and Intended Use . . . . . . . . . . . . . . . . . 3
2. Matching Rules . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 caseIgnoreNonasciiMatch . . . . . . . . . . . . . . . . . 4
2.2 caseIgnoreNonasciiOrderingMatch . . . . . . . . . . . . . 4
2.3 caseIgnoreNonasciiSubstringMatch . . . . . . . . . . . . . 4
3. Security Considerations . . . . . . . . . . . . . . . . . . . 5
4. Normative References . . . . . . . . . . . . . . . . . . . . . 5
Author's Address . . . . . . . . . . . . . . . . . . . . . . . 5
Intellectual Property and Copyright Statements . . . . . . . . 6
Pauzies Expires October 22, 2004 [Page 2]
Internet-Draft LDAP: Additional Matching Rules April 2004
1. Background and Intended Use
When using thoses rules, non-ASCII characters such as letters with
accents are converted (when UTF-8 compatibility conversion is
possible RFC 2044 [RFC2044]) to ASCII characters (same letter without
accent) before the match.
Pauzies Expires October 22, 2004 [Page 3]
Internet-Draft LDAP: Additional Matching Rules April 2004
2. Matching Rules
2.1 caseIgnoreNonasciiMatch
The caseIgnoreNonasciiMatch rule compares for equality the asserted
value with an attribute value of DirectoryString syntax. The rule is
identical to the caseIgnoreMatch RFC 2252 [RFC2252] rule except that
non-ASCII characters are matched like their ASCII equivalent.
( 1.3.6.1.4.1.10943.10.4.1 NAME 'caseIgnoreNonasciiMatch' SYNTAX
1.3.6.1.4.1.1466.115.121.1.15 )
The DirectoryString (1.3.6.1.4.1.1466.115.121.1.15) syntax is
described in RFC 2252 [RFC2252].
2.2 caseIgnoreNonasciiOrderingMatch
The caseIgnoreNonasciiOrderingMatch rule compares the collation order
of the asserted string with an attribute value of DirectoryString
syntax. The rule is identical to the caseIgnoreOrderingMatch RFC 2252
[RFC2252] rule except that non-ASCII characters are matched like
their ASCII equivalent
( 1.3.6.1.4.1.10943.10.4.2 NAME 'caseIgnoreNonasciiOrderingMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
2.3 caseIgnoreNonasciiSubstringMatch
The caseIgnoreNonasciiSubstringsMatch rule determines whether the
asserted value(s) are substrings of an attribute value of
DirectoryString syntax. The rule is identical to the
caseIgnoreSubstringsMatch RFC 2252 [RFC2252] rule except that
non-ASCII characters are matched like their ASCII equivalent.
( 1.3.6.1.4.1.10943.10.4.3 NAME 'caseIgnoreNonasciiSubstringsMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
The SubstringsAssertion (1.3.6.1.4.1.1466.115.121.1.58) syntax is
described in RFC 2252 [RFC2252].
Pauzies Expires October 22, 2004 [Page 4]
Internet-Draft LDAP: Additional Matching Rules April 2004
3. Security Considerations
This memo raises no security issues.
4 Normative References
[RFC2044] Yergeau, F., "UTF-8, a transformation format of Unicode
and ISO 10646", October 1996.
[RFC2252] Wahl, M., "Lightweight Directory Access Protocol (v3):
Attribute Syntax Definitions", December 1997.
[RFC3698] Zeilenga, K., "Lightweight Directory Access Protocol
(LDAP): Additional Matching Rules", February 2004.
Author's Address
Alexandre Pauzies
LINAGORA
30, rue Saint Augustin
Paris 75002
FR
Phone: +33 01 58 18 68 28
Fax: +33 01 58 18 68 29
EMail: alexandre.pauzies@linagora.com
URI: http://www.linagora.com/
Pauzies Expires October 22, 2004 [Page 5]
Internet-Draft LDAP: Additional Matching Rules April 2004
Intellectual Property Statement
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the IETF's procedures with respect to rights in IETF Documents can
be found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
Disclaimer of Validity
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Copyright Statement
Copyright (C) The Internet Society (2004). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
Acknowledgment
Funding for the RFC Editor function is currently provided by the
Internet Society.
Pauzies Expires October 22, 2004 [Page 6]
--Boundary-00=_/08lA/HqUu6p165
Content-Type: text/xml;
charset="iso-8859-1";
name="draft-pauzies-ldap-schema-nonascii-mr-00.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="draft-pauzies-ldap-schema-nonascii-mr-00.xml"
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC ''
'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<rfc ipr="full3667" docName="draft-pauzies-ldap-schema-nonascii-mr-00">
<front>
<title>LDAP: Additional Matching Rules</title>
<author initials="A.P." surname="Pauzies" fullname="Alexandre Pauzies">
<organization>LINAGORA</organization>
<address>
<postal>
<street>30, rue Saint Augustin</street>
<city>Paris</city> <code>75002</code>
<country>FR</country>
</postal>
<phone>+33 01 58 18 68 28</phone>
<facsimile>+33 01 58 18 68 29</facsimile>
<email>alexandre.pauzies@linagora.com</email>
<uri>http://www.linagora.com/</uri>
</address>
</author>
<date month="April" year="2004" />
<area>Internet</area>
<keyword>Lightweight Directory Access Protocol</keyword>
<keyword>LDAP</keyword>
<keyword>Matching Rules</keyword>
<abstract>
<t>This document provides a collection of matching rules for use with the
Lightweight Directory Access Protocol (LDAP). Thoses matching rules are
simple adaptations of existing LDAP matching rules allowing a more flexible
match on non-ASCII strings.</t>
</abstract>
</front>
<middle>
<section title="Background and Intended Use">
<t>When using thoses rules, non-ASCII characters such as letters with accents are
converted (when UTF-8 compatibility conversion is possible <xref target="RFC2044">RFC 2044</xref>)
to ASCII characters (same letter without accent) before the match.</t>
</section>
<section title="Matching Rules">
<section title="caseIgnoreNonasciiMatch">
<t>The caseIgnoreNonasciiMatch rule compares for equality the asserted value with
an attribute value of DirectoryString syntax. The rule is identical to the
caseIgnoreMatch <xref target="RFC2252">RFC 2252</xref> rule except that non-ASCII
characters are matched like their ASCII equivalent.</t>
<t>( 1.3.6.1.4.1.10943.10.4.1 NAME 'caseIgnoreNonasciiMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )</t>
<t>The DirectoryString (1.3.6.1.4.1.1466.115.121.1.15) syntax is
described in <xref target="RFC2252">RFC 2252</xref>.</t>
</section>
<section title="caseIgnoreNonasciiOrderingMatch">
<t>The caseIgnoreNonasciiOrderingMatch rule compares the collation order of the
asserted string with an attribute value of DirectoryString syntax.
The rule is identical to the caseIgnoreOrderingMatch <xref target="RFC2252">RFC 2252</xref>
rule except that non-ASCII characters are matched like their ASCII equivalent</t>
<t>( 1.3.6.1.4.1.10943.10.4.2 NAME 'caseIgnoreNonasciiOrderingMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )</t>
</section>
<section title="caseIgnoreNonasciiSubstringMatch">
<t>The caseIgnoreNonasciiSubstringsMatch rule determines whether the asserted
value(s) are substrings of an attribute value of DirectoryString syntax. The
rule is identical to the caseIgnoreSubstringsMatch <xref target="RFC2252">RFC 2252</xref>
rule except that non-ASCII characters are matched like their ASCII equivalent.</t>
<t>( 1.3.6.1.4.1.10943.10.4.3 NAME 'caseIgnoreNonasciiSubstringsMatch'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )</t>
<t>The SubstringsAssertion (1.3.6.1.4.1.1466.115.121.1.58) syntax is
described in <xref target="RFC2252">RFC 2252</xref>.</t>
</section>
</section>
<section title="Security Considerations">
<t>This memo raises no security issues.</t>
</section>
</middle>
<back>
<references title='Normative References'>
<reference anchor="RFC3698">
<front>
<title>Lightweight Directory Access Protocol (LDAP): Additional Matching Rules</title>
<author initials="K." surname="Zeilenga" fullname="Kurt D. Zeilenga">
<organization>OpenLDAP Foundation</organization>
</author>
<date month="February" year="2004" />
</front>
</reference>
<reference anchor="RFC2252">
<front>
<title>Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions</title>
<author initials="M." surname="Wahl" fullname="Mark Wahl">
<organization>Critical Angle Inc.</organization>
</author>
<date month="December" year="1997" />
</front>
</reference>
<reference anchor="RFC2044">
<front>
<title>UTF-8, a transformation format of Unicode and ISO 10646</title>
<author initials="F." surname="Yergeau" fullname="Francois Yergeau">
<organization>Alis Technologies</organization>
</author>
<date month="October" year="1996" />
</front>
</reference>
</references>
</back>
</rfc>
--Boundary-00=_/08lA/HqUu6p165
Content-Type: text/x-diff;
charset="iso-8859-1";
name="openldap-2.1.30-nonascii.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="openldap-2.1.30-nonascii.diff"
--- openldap-2.1.30/servers/slapd/schema_init.c 2003-06-13 19:07:00.000000000 +0200
+++ openldap-2.1.30-nonascii/servers/slapd/schema_init.c 2004-04-23 13:20:55.022695936 +0200
@@ -57,6 +57,7 @@
/* ordering matching rules */
#define caseIgnoreOrderingMatch caseIgnoreMatch
+#define caseIgnoreNonasciiOrderingMatch caseIgnoreNonasciiMatch
#define caseExactOrderingMatch caseExactMatch
#define integerOrderingMatch integerMatch
@@ -84,7 +85,9 @@
#define telephoneNumberSubstringsFilter caseIgnoreIA5SubstringsFilter
static MatchingRule *caseExactMatchingRule;
+static MatchingRule *caseIgnoreNonasciiMatchingRule;
static MatchingRule *caseExactSubstringsMatchingRule;
+static MatchingRule *caseIgnoreNonasciiSubstringsMatchingRule;
static MatchingRule *integerFirstComponentMatchingRule;
static const struct MatchingRulePtr {
@@ -93,7 +96,9 @@
} mr_ptr [] = {
/* must match OIDs below */
{ "2.5.13.5", &caseExactMatchingRule },
+ { "1.3.6.1.4.1.10943.10.4.1", &caseIgnoreNonasciiMatchingRule },
{ "2.5.13.7", &caseExactSubstringsMatchingRule },
+ { "1.3.6.1.4.1.10943.10.4.3", &caseIgnoreNonasciiSubstringsMatchingRule },
{ "2.5.13.29", &integerFirstComponentMatchingRule }
};
@@ -1100,8 +1105,12 @@
char *nav = NULL;
unsigned casefold;
- casefold = ( mr != caseExactSubstringsMatchingRule )
- ? LDAP_UTF8_CASEFOLD : LDAP_UTF8_NOCASEFOLD;
+ if ( mr == (MatchingRule *)caseExactIgnoreSubstringsMatch )
+ casefold = LDAP_UTF8_NOCASEFOLD;
+ else if ( mr == (MatchingRule *)caseIgnoreNonasciiSubstringsMatchingRule )
+ casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ else
+ casefold = LDAP_UTF8_CASEFOLD;
if ( UTF8bvnormalize( value, &left, casefold ) == NULL ) {
match = 1;
@@ -1270,8 +1279,12 @@
slen = syntax->ssyn_oidlen;
mlen = mr->smr_oidlen;
- casefold = ( mr != caseExactMatchingRule )
- ? LDAP_UTF8_CASEFOLD : LDAP_UTF8_NOCASEFOLD;
+ if ( mr == (MatchingRule *)caseExactMatchingRule )
+ casefold = LDAP_UTF8_NOCASEFOLD;
+ else if ( mr == (MatchingRule *)caseIgnoreNonasciiMatchingRule )
+ casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ else
+ casefold = LDAP_UTF8_CASEFOLD;
for( i=0; values[i].bv_val != NULL; i++ ) {
struct berval value, nvalue;
@@ -1347,8 +1360,12 @@
slen = syntax->ssyn_oidlen;
mlen = mr->smr_oidlen;
- casefold = ( mr != caseExactMatchingRule )
- ? LDAP_UTF8_CASEFOLD : LDAP_UTF8_NOCASEFOLD;
+ if ( mr == (MatchingRule *)caseExactMatchingRule )
+ casefold = LDAP_UTF8_NOCASEFOLD;
+ else if ( mr == (MatchingRule *)caseIgnoreNonasciiMatchingRule )
+ casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ else
+ casefold = LDAP_UTF8_CASEFOLD;
UTF8bvnormalize( (struct berval *) assertedValue, &value, casefold );
/* This usually happens if filter contains bad UTF8 */
@@ -1413,8 +1430,12 @@
/* we should have at least one value at this point */
assert( i > 0 );
- casefold = ( mr != caseExactSubstringsMatchingRule )
- ? LDAP_UTF8_CASEFOLD : LDAP_UTF8_NOCASEFOLD;
+ if ( mr == (MatchingRule *)caseExactIgnoreSubstringsMatch )
+ casefold = LDAP_UTF8_NOCASEFOLD;
+ else if ( mr == (MatchingRule *)caseIgnoreNonasciiSubstringsMatchingRule )
+ casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ else
+ casefold = LDAP_UTF8_CASEFOLD;
tvalues = ch_malloc( sizeof( struct berval ) * (i+1) );
nvalues = ch_malloc( sizeof( struct berval ) * (i+1) );
@@ -1614,8 +1635,12 @@
struct berval *value;
struct berval digest;
- casefold = ( mr != caseExactSubstringsMatchingRule )
- ? LDAP_UTF8_CASEFOLD : LDAP_UTF8_NOCASEFOLD;
+ if ( mr == (MatchingRule *)caseExactIgnoreSubstringsMatch )
+ casefold = LDAP_UTF8_NOCASEFOLD;
+ else if ( mr == (MatchingRule *)caseIgnoreNonasciiSubstringsMatchingRule )
+ casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ else
+ casefold = LDAP_UTF8_CASEFOLD;
sa = UTF8SubstringsassertionNormalize( assertedValue, casefold );
if( sa == NULL ) {
@@ -1784,7 +1809,39 @@
LDAP_UTF8_CASEFOLD );
return LDAP_SUCCESS;
}
-
+
+static int
+caseIgnoreNonasciiMatch(
+ int *matchp,
+ slap_mask_t flags,
+ Syntax *syntax,
+ MatchingRule *mr,
+ struct berval *value,
+ void *assertedValue )
+{
+ struct berval left = { 0, NULL };
+ struct berval val = { 0, NULL };
+ unsigned casefold = LDAP_UTF8_CASEFOLD|LDAP_UTF8_APPROX;
+ int res;
+
+ UTF8bvnormalize( value, &left, casefold );
+ if( left.bv_val == NULL ) {
+ *matchp = 1;
+ return LDAP_SUCCESS;
+ }
+
+ UTF8bvnormalize( ((struct berval *)assertedValue),
+ &val, casefold );
+ if( val.bv_val == NULL ) {
+ *matchp = -1;
+ return LDAP_SUCCESS;
+ }
+
+ *matchp = strcmp(left.bv_val, val.bv_val);
+
+ return LDAP_SUCCESS;
+}
+
/* Remove all spaces and '-' characters */
static int
telephoneNumberNormalize(
@@ -4578,6 +4635,14 @@
caseIgnoreMatch, caseExactIgnoreIndexer, caseExactIgnoreFilter,
directoryStringApproxMatchOID },
+ {"( 1.3.6.1.4.1.10943.10.4.1 NAME 'caseIgnoreNonasciiMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
+ SLAP_MR_EQUALITY | SLAP_MR_EXT | SLAP_MR_DN_FOLD,
+ directoryStringSyntaxes,
+ NULL, NULL,
+ caseIgnoreNonasciiMatch, caseExactIgnoreIndexer, caseExactIgnoreFilter,
+ directoryStringApproxMatchOID },
+
{"( 2.5.13.3 NAME 'caseIgnoreOrderingMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_ORDERING, directoryStringSyntaxes,
@@ -4585,6 +4650,13 @@
caseIgnoreOrderingMatch, NULL, NULL,
NULL},
+ {"( 1.3.6.1.4.1.10943.10.4.2 NAME 'caseIgnoreNonasciiOrderingMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
+ SLAP_MR_ORDERING, directoryStringSyntaxes,
+ NULL, NULL,
+ caseIgnoreNonasciiOrderingMatch, NULL, NULL,
+ NULL},
+
{"( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )",
SLAP_MR_SUBSTR, NULL,
@@ -4594,6 +4666,15 @@
caseExactIgnoreSubstringsFilter,
NULL},
+ {"( 1.3.6.1.4.1.10943.10.4.3 NAME 'caseIgnoreNonasciiSubstringsMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )",
+ SLAP_MR_SUBSTR, directoryStringSyntaxes,
+ NULL, NULL,
+ caseExactIgnoreSubstringsMatch,
+ caseExactIgnoreSubstringsIndexer,
+ caseExactIgnoreSubstringsFilter,
+ NULL},
+
{"( 2.5.13.5 NAME 'caseExactMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, directoryStringSyntaxes,
--Boundary-00=_/08lA/HqUu6p165
Content-Type: text/x-diff;
charset="iso-8859-1";
name="openldap-2.2.10-nonascii.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="openldap-2.2.10-nonascii.diff"
--- openldap-2.2.10/servers/slapd/schema_init.c 2004-04-12 20:13:21.000000000 +0200
+++ openldap-2.2.10-nonascii/servers/slapd/schema_init.c 2004-04-23 13:35:43.000000000 +0200
@@ -1197,6 +1197,11 @@
? LDAP_UTF8_NOCASEFOLD : LDAP_UTF8_CASEFOLD;
flags |= ( ( use & SLAP_MR_EQUALITY_APPROX ) == SLAP_MR_EQUALITY_APPROX )
? LDAP_UTF8_APPROX : 0;
+ flags |= SLAP_MR_ASSOCIATED( mr, slap_schema.si_mr_caseIgnoreNonasciiMatch )
+ ? LDAP_UTF8_APPROX : 0;
+ flags |= SLAP_MR_ASSOCIATED( mr, slap_schema.si_mr_caseIgnoreNonasciiSubstringsMatch )
+ ? LDAP_UTF8_APPROX : 0;
+
val = UTF8bvnormalize( val, &tmp, flags, ctx );
if( val == NULL ) {
@@ -3083,6 +3088,13 @@
octetStringIndexer, octetStringFilter,
directoryStringApproxMatchOID },
+ {"( 1.3.6.1.4.1.10943.10.4.1 NAME 'caseIgnoreNonasciiMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
+ SLAP_MR_EQUALITY | SLAP_MR_EXT, directoryStringSyntaxes,
+ NULL, UTF8StringNormalize, octetStringMatch,
+ octetStringIndexer, octetStringFilter,
+ directoryStringApproxMatchOID },
+
{"( 2.5.13.3 NAME 'caseIgnoreOrderingMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_ORDERING, directoryStringSyntaxes,
@@ -3090,6 +3102,13 @@
NULL, NULL,
"caseIgnoreMatch" },
+ {"( 1.3.6.1.4.1.10943.10.4.2 NAME 'caseIgnoreNonasciiOrderingMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
+ SLAP_MR_ORDERING, directoryStringSyntaxes,
+ NULL, UTF8StringNormalize, octetStringOrderingMatch,
+ NULL, NULL,
+ "caseIgnoreNonasciiMatch" },
+
{"( 2.5.13.4 NAME 'caseIgnoreSubstringsMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )",
SLAP_MR_SUBSTR, directoryStringSyntaxes,
@@ -3097,6 +3116,13 @@
octetStringSubstringsIndexer, octetStringSubstringsFilter,
"caseIgnoreMatch" },
+ {"( 1.3.6.1.4.1.10943.10.4.3 NAME 'caseIgnoreNonasciiSubstringsMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )",
+ SLAP_MR_SUBSTR, directoryStringSyntaxes,
+ NULL, UTF8StringNormalize, octetStringSubstringsMatch,
+ octetStringSubstringsIndexer, octetStringSubstringsFilter,
+ "caseIgnoreNonasciiMatch" },
+
{"( 2.5.13.5 NAME 'caseExactMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT, directoryStringSyntaxes,
--- openldap-2.2.10/servers/slapd/schema_prep.c 2004-01-17 20:32:20.000000000 +0100
+++ openldap-2.2.10-nonascii/servers/slapd/schema_prep.c 2004-04-23 13:35:43.000000000 +0200
@@ -810,8 +810,12 @@
offsetof(struct slap_internal_schema, si_mr_caseExactIA5Match) },
{ "caseExactMatch",
offsetof(struct slap_internal_schema, si_mr_caseExactMatch) },
+ { "caseIgnoreNonasciiMatch",
+ offsetof(struct slap_internal_schema, si_mr_caseIgnoreNonasciiMatch) },
{ "caseExactSubstringsMatch",
offsetof(struct slap_internal_schema, si_mr_caseExactSubstringsMatch) },
+ { "caseIgnoreNonasciiSubstringsMatch",
+ offsetof(struct slap_internal_schema, si_mr_caseIgnoreNonasciiSubstringsMatch) },
{ "distinguishedNameMatch",
offsetof(struct slap_internal_schema, si_mr_distinguishedNameMatch) },
{ "integerMatch",
--- openldap-2.2.10/servers/slapd/slap.h 2004-04-12 20:20:12.000000000 +0200
+++ openldap-2.2.10-nonascii/servers/slapd/slap.h 2004-04-23 15:09:55.482394928 +0200
@@ -834,7 +834,9 @@
/* Matching Rules */
MatchingRule *si_mr_distinguishedNameMatch;
MatchingRule *si_mr_caseExactMatch;
+ MatchingRule *si_mr_caseIgnoreNonasciiMatch;
MatchingRule *si_mr_caseExactSubstringsMatch;
+ MatchingRule *si_mr_caseIgnoreNonasciiSubstringsMatch;
MatchingRule *si_mr_caseExactIA5Match;
MatchingRule *si_mr_integerMatch;
MatchingRule *si_mr_integerFirstComponentMatch;
--Boundary-00=_/08lA/HqUu6p165--