Hi, following search shows correct results: ldapsearch -Y EXTERNAL -H ldapi:/// \ -b "cn=billy kid,ou=tombstone,o=avci,c=de" -s base \ "(l:caseExactmatch:=Tombstone)" sn l
# LDAPv3 # base <cn=billy kid,ou=tombstone,o=avci,c=de> with scope baseObject # filter: (l:caseExactmatch:=Tombstone) # requesting: sn l #
# Billy Kid, tombstone, avci, de dn: cn=Billy Kid,ou=tombstone,o=avci,c=de sn: Kid l: Tombstone
# search result
# numResponses: 2 # numEntries: 1
changing the filter to (l:caseExactmatch:=tombstone) shows the expected results
# search result search: 2 result: 0 Success
Now a search with assertion control allways shows error 122
ldapsearch -YEXTERNAL -e assert='l=Tombstone'-H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
LDAPv3 # base <cn=Billy Kid,ou=tombstone,o=avci,c=de> with scope baseObject # filter: (objectclass=*) # requesting: ldapi:/// sn l #
# search result search: 2 result: 122 Assertion Failed
The same applies to an extended assertion filter ldapsearch -YEXTERNAL -e assert='l:caseExactmatch:=Tombstone' -H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
# search result search: 2 result: 122 Assertion Failed
What is wrong with this assertion filter?
-Dieter
Dieter Klünter wrote:
changing the filter to (l:caseExactmatch:=tombstone) shows the expected results
# search result search: 2 result: 0 Success
Now a search with assertion control allways shows error 122
ldapsearch -YEXTERNAL -e assert='l=Tombstone'-H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
LDAPv3 # base <cn=Billy Kid,ou=tombstone,o=avci,c=de> with scope baseObject # filter: (objectclass=*) # requesting: ldapi:/// sn l #
# search result search: 2 result: 122 Assertion Failed
The same applies to an extended assertion filter ldapsearch -YEXTERNAL -e assert='l:caseExactmatch:=Tombstone' -H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
# search result search: 2 result: 122 Assertion Failed
What is wrong with this assertion filter?
Do you also have slapo-unique configured for this DB? If yes, you might hit ITS#6916.
http://www.openldap.org/its/index.cgi?findid=6916
Ciao, Michael.
On Mon, 10 Jun 2013, Dieter Klünter wrote: ...
Now a search with assertion control allways shows error 122
ldapsearch -YEXTERNAL -e assert='l=Tombstone'-H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
You left out the space between the assertion control and the -H. As a result, "ldapi:///" was taken as an attribute to return and the assertion filter was "l=Tombstone-H", which will obviously fail.
This isn't just a typo in your email, as can be seen here:
# requesting: ldapi:/// sn l
The same applies to an extended assertion filter ldapsearch -YEXTERNAL -e assert='l:caseExactmatch:=Tombstone' -H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
# search result search: 2 result: 122 Assertion Failed
What is wrong with this assertion filter?
You don't show the full output so I can't tell whether you made the same typo there, but assertions like that work for me with OpenLDAP 2.4.35
Philip Guenther
Am Mon, 10 Jun 2013 09:34:50 -0700 schrieb Philip Guenther guenther+ldaptech@sendmail.com:
On Mon, 10 Jun 2013, Dieter Klünter wrote: ...
Now a search with assertion control allways shows error 122
ldapsearch -YEXTERNAL -e assert='l=Tombstone'-H ldapi:/// -b "cn=Billy Kid,ou=tombstone,o=avci,c=de" -s base sn l
You left out the space between the assertion control and the -H. As a result, "ldapi:///" was taken as an attribute to return and the assertion filter was "l=Tombstone-H", which will obviously fail.
This isn't just a typo in your email, as can be seen here:
# requesting: ldapi:/// sn l
Right you are, mea culpa.
-Dieter
openldap-technical@openldap.org