]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9232 - Implement caseIgnoreListSubstringsMatch.
authorFredrik Roubert <fredrik@roubert.name>
Sun, 19 Apr 2020 18:16:06 +0000 (20:16 +0200)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 21 Aug 2020 21:45:19 +0000 (21:45 +0000)
servers/slapd/schema_init.c
tests/data/search.out.xsearch
tests/scripts/test015-xsearch

index c067ef825cea1785709fc16139701c21951d002b..8a82a9826042ac01d5219b7df41bc1c2039025c5 100644 (file)
@@ -6647,7 +6647,8 @@ static slap_mrule_defs_rec mrule_defs[] = {
        {"( 2.5.13.12 NAME 'caseIgnoreListSubstringsMatch' "
                "SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )", /* Substring Assertion */
                SLAP_MR_SUBSTR, NULL,
-               NULL, NULL, NULL, NULL, NULL,
+               NULL, postalAddressNormalize, directoryStringSubstringsMatch,
+               octetStringSubstringsIndexer, octetStringSubstringsFilter,
                "caseIgnoreListMatch" },
 
        {"( 2.5.13.13 NAME 'booleanMatch' "
index 8bbddcad367e8d7ab15d19e1064d7d016c74f44a..196bab14b4f2ed8007b96a3bb39b426523ad9e9b 100644 (file)
@@ -643,3 +643,40 @@ attributeTypes: ( 0.9.2342.19200300.100.1.25 NAME ( 'dc' 'domainComponent' ) D
  ESC 'RFC1274/2247: domain component' EQUALITY caseIgnoreIA5Match SUBSTR caseI
  gnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
+dn: cn=Barbara Jensen,ou=Information Technology Division,ou=People,dc=example,
+ dc=com
+postalAddress: ITD Prod Dev & Deployment $ 535 W. William St. Room 4212 $ Anyt
+ own, MI 48103-4943
+
+dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc
+ =com
+postalAddress: Info Tech Division $ 535 W. William St. $ Anytown, MI 48103
+
+dn: cn=Dorothy Stevens,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
+dn: dc=example,dc=com
+postalAddress: Example, Inc. $ 535 W. William St. $ Anytown, MI 48109 $ US
+
+dn: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
+dn: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=example
+ ,dc=com
+postalAddress: Info Tech Division $ 535 W William $ Anytown, MI 48103
+
+dn: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
+dn: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
+dn: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc=com
+postalAddress: ITD $ 535 W. William $ Anytown, MI 48109
+
+dn: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
+dn: cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com
+postalAddress: Alumni Association $ 111 Maple St $ Anytown, MI 48109
+
index 0545761ab4e6d1606e9a34080299baeba27471e8..634bb60a77e906b940417b78a08d0c46e1aff8b1 100755 (executable)
@@ -236,6 +236,17 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+echo "Testing list substring searching..."
+echo "# Testing list substring searching..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+       '(postalAddress=*Anytown*)' postalAddress >> $SEARCHOUT 2>&1
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 LDIF=$SEARCHOUTPROVIDER