git.samba.org
/
kai
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s4-ldb: fixed the ldb 'displayName=a,b' indexing bug
[kai/samba.git]
/
source4
/
lib
/
ldb
/
ldb_tdb
/
ldb_index.c
diff --git
a/source4/lib/ldb/ldb_tdb/ldb_index.c
b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 4f5979877bd0da57e14e574e7413a8949026d4c0..a39e6c7097b46c2da11800e3d1f2b516f96b0bc0 100644
(file)
--- a/
source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/
source4/lib/ldb/ldb_tdb/ldb_index.c
@@
-1446,8
+1446,10
@@
static int delete_index(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, vo
* index entry */
list.dn = NULL;
list.count = 0;
* index entry */
list.dn = NULL;
list.count = 0;
- v.data = key.dptr;
- v.length = strnlen((char *)key.dptr, key.dsize);
+
+ /* the offset of 3 is to remove the DN= prefix. */
+ v.data = key.dptr + 3;
+ v.length = strnlen((char *)key.dptr, key.dsize) - 3;
dn = ldb_dn_from_ldb_val(ltdb, ldb_module_get_ctx(module), &v);
ret = ltdb_dn_list_store(module, dn, &list);
dn = ldb_dn_from_ldb_val(ltdb, ldb_module_get_ctx(module), &v);
ret = ltdb_dn_list_store(module, dn, &list);