git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93b1898
)
ldb_tdb: Optionally use GUID index values a direct TDB keys
author
Andrew Bartlett
<abartlet@samba.org>
Thu, 10 Aug 2017 05:05:37 +0000
(17:05 +1200)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 22 Sep 2017 19:20:23 +0000
(21:20 +0200)
This connects the GUID based index records to GUID based TDB keys.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_tdb.c
patch
|
blob
|
history
diff --git
a/lib/ldb/ldb_tdb/ldb_tdb.c
b/lib/ldb/ldb_tdb/ldb_tdb.c
index a5cd523f3b2cbbc3f7355a2873d7bb55fee6a152..f8d80e9e49069c55dacf6d0039502e342c3c471f 100644
(file)
--- a/
lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/
lib/ldb/ldb_tdb/ldb_tdb.c
@@
-256,6
+256,10
@@
TDB_DATA ltdb_idx_to_key(struct ldb_module *module,
struct ldb_context *ldb = ldb_module_get_ctx(module);
struct ldb_dn *dn;
+ if (ltdb->cache->GUID_index_attribute != NULL) {
+ return ltdb_guid_to_key(module, ltdb, mem_ctx, idx_val);
+ }
+
dn = ldb_dn_from_ldb_val(mem_ctx, ldb, idx_val);
if (dn == NULL) {
errno = EINVAL;