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.
Created attachment 489858 [details] 0003-Bug-693455-nsMatchingRule-does-not-work-with-multipl.patch
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
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
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.