Bug 693455 - nsMatchingRule does not work with multiple values
nsMatchingRule does not work with multiple values
Status: CLOSED CURRENTRELEASE
Product: 389
Classification: Community
Component: Database - Indexes/Searches (Show other bugs)
1.2.8
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
:
Depends On:
Blocks: 639035 389_1.2.8 693522
  Show dependency treegraph
 
Reported: 2011-04-04 13:55 EDT by Rich Megginson
Modified: 2015-12-07 12:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 693522 (view as bug list)
Environment:
Last Closed: 2015-12-07 12:17:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Rich Megginson 2011-04-04 13:55:34 EDT
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 17:12:48 EDT
Created attachment 489858 [details]
0003-Bug-693455-nsMatchingRule-does-not-work-with-multipl.patch
Comment 2 Rich Megginson 2011-04-04 21:43:14 EDT
To ssh://git.fedorahosted.org/git/389/ds.git
   27ff25d..466fced  master -> master
commit 58902a28c077309cf0e942bfb03762d96eb9c8af
Author: Rich Megginson <rmeggins@redhat.com>
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-04 22:08:02 EDT
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@redhat.com>
Date:   Mon Apr 4 11:55:30 2011 -0600
Comment 4 Amita Sharma 2011-04-29 02:38:15 EDT
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.