Bug 8647 - ldbsearch for "(attr>9)" returns invalid result
ldbsearch for "(attr>9)" returns invalid result
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB
unspecified
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
samba4-qa@samba.org
:
Depends on:
Blocks: 8622
  Show dependency treegraph
 
Reported: 2011-12-06 11:06 UTC by Stefan Metzmacher
Modified: 2012-08-22 16:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2011-12-06 11:06:04 UTC
While "(attr>=9)" only returns objects with attr >= 9
"(attr>9)" also returns objects with attr < 9.

$ bin/ldbsearch -H tmp.ldb 
# record 1
dn: cn=obj1
attr: 5
distinguishedName: cn=obj1

# record 2
dn: cn=obj2
attr: 10
distinguishedName: cn=obj2

# returned 2 records
# 2 entries
# 0 referrals

$ bin/ldbsearch -H tmp.ldb '(attr>=9)'
# record 1
dn: cn=obj2
attr: 10
distinguishedName: cn=obj2

# returned 1 records
# 1 entries
# 0 referrals

$ bin/ldbsearch -H tmp.ldb '(attr>9)'
# record 1
dn: cn=obj1

# record 2
dn: cn=obj2

# returned 2 records
# 2 entries
# 0 referrals
Comment 1 Matthias Dieter Wallnöfer 2012-05-04 10:06:33 UTC
Andrew, metze,

this bug had a very funny cause (the ldbsearch parsing code detected only "=" as a filter candidate). A patch for this and some related issues can be found in my own "master" branch.
Comment 2 Arvid Requate 2012-08-14 10:27:55 UTC
Hi Matthias,

could you comment which commit are you refering to?
Comment 4 Matthias Dieter Wallnöfer 2012-08-22 16:46:17 UTC
Fixed in "master".