Bug 693455 - nsMatchingRule does not work with multiple values
Summary: nsMatchingRule does not work with multiple values
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Database - Indexes/Searches
Version: 1.2.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 639035 389_1.2.8 693522
TreeView+ depends on / blocked
 
Reported: 2011-04-04 17:55 UTC by Rich Megginson
Modified: 2015-12-07 17:17 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 693522 (view as bug list)
Environment:
Last Closed: 2015-12-07 17:17:38 UTC
Embargoed:


Attachments (Terms of Use)
0003-Bug-693455-nsMatchingRule-does-not-work-with-multipl.patch (1.70 KB, patch)
2011-04-04 21:12 UTC, Rich Megginson
nkinder: review+
Details | Diff

Description Rich Megginson 2011-04-04 17:55:34 UTC
nsMatchingRule is supposed to be a multi-valued attribute e.g.
nsMatchingRule: 2.16.840.1.113730.3.3.2.15.1
nsMatchingRule: 2.16.840.1.113730.3.3.2.15.1.6
nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1.6

This does not work.  The server concatenates them all together with no spaces or other delimiters.

Comment 1 Rich Megginson 2011-04-04 21:12:48 UTC
Created attachment 489858 [details]
0003-Bug-693455-nsMatchingRule-does-not-work-with-multipl.patch

Comment 2 Rich Megginson 2011-04-05 01:43:14 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   27ff25d..466fced  master -> master
commit 58902a28c077309cf0e942bfb03762d96eb9c8af
Author: Rich Megginson <rmeggins>
Date:   Mon Apr 4 11:55:30 2011 -0600
    Reviewed by: nkinder (Thanks!)
    Branch: master
    Fix Description: The variable isFirst was not being used correctly.  Instead
    of using it, just use tmpBuf[0] to see if this is the first iteration or
    not.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no

Comment 3 Rich Megginson 2011-04-05 02:08:02 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   e2288d9..5c1cd5f  389-ds-base-1.2.8 -> 389-ds-base-1.2.8
commit 9a5ad287f2b4d0c3ce49be3107c61c00551b9314
Author: Rich Megginson <rmeggins>
Date:   Mon Apr 4 11:55:30 2011 -0600

Comment 4 Amita Sharma 2011-04-29 06:38:15 UTC
1. [root@rheltest slapd-rheltest]# ldapmodify -a -D "cn=directory manager" -w
Secret123 -p 1389 -h localhost << EOF
> dn: cn=businesscategory,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
> nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
> nsMatchingRule: 2.16.840.1.113730.3.3.2.3.1
> nsMatchingRule: 2.16.840.1.113730.3.3.2.17.1
> nsIndexType: eq
> nsIndexType: pres
> nsIndexType: sub
> nsSystemIndex: false
> objectClass: top
> objectClass: nsIndex
> cn: businesscategory
> EOF
adding new entry "cn=businesscategory,cn=index,cn=userRoot,cn=ldbm
database,cn=plugins,cn=config"

2. [root@rheltest slapd-rheltest]# cd /usr/lib64/dirsrv/slapd-rheltest/
[root@rheltest slapd-rheltest]# ./db2index.pl -D "cn=Directory Manager" -w
Secret123 -n userRoot -t businesscategory
adding new entry "cn=db2index_2011_4_28_13_45_50, cn=index, cn=tasks,
cn=config"

3. [root@rheltest slapd-rheltest]# ldapsearch -x -D "cn=directory manager" -w
Secret123 -p 1389 -h localhost -b "cn=index,cn=userRoot,cn=ldbm
database,cn=plugins,cn=config"
# businesscategory, index, userRoot, ldbm database, plugins, config
dn: cn=businesscategory,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=co
 nfig
nsMatchingRule: 2.16.840.1.113730.3.3.2.11.1
nsMatchingRule: 2.16.840.1.113730.3.3.2.3.1
nsMatchingRule: 2.16.840.1.113730.3.3.2.17.1
nsIndexType: eq
nsIndexType: pres
nsIndexType: sub
nsSystemIndex: false
objectClass: top
objectClass: nsIndex
cn: businesscategory

[root@rheltest slapd-rheltest]# ldapmodify -x -h localhost -p 1389 -D
"cn=Directory Manager" -w Secret123 << EOF
> dn: uid=amimash,dc=example,dc=com
> changetype: modify
> add: businesscategory
> businesscategory: abcd
> EOF
modifying entry "uid=amimash,dc=example,dc=com"

[root@rheltest slapd-rheltest]# find / -name *.db4 | grep -i
BusinessCategory.db4
/var/lib/dirsrv/slapd-rheltest/db/userRoot/businesscategory.db4

Marking the bug as VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.