mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
ldb_tdb: Add improved error strings on ltdb_key_dn_from_idx() failure
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
50f36e4fb5
commit
1f42ded463
@ -316,6 +316,14 @@ int ltdb_key_dn_from_idx(struct ldb_module *module,
|
||||
return LDB_ERR_NO_SUCH_OBJECT;
|
||||
}
|
||||
if (list->count > 1) {
|
||||
const char *dn_str = ldb_dn_get_linearized(dn);
|
||||
ldb_asprintf_errstring(ldb_module_get_ctx(module),
|
||||
__location__
|
||||
": Failed to read DN index "
|
||||
"against %s for %s: too many "
|
||||
"values (%u > 1)",
|
||||
ltdb->cache->GUID_index_attribute,
|
||||
dn_str, list->count);
|
||||
return LDB_ERR_CONSTRAINT_VIOLATION;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user