1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

ldb-samba: Correct error reporting to match Windows

In some cases instead of replying with an error Windows instead returns
0 results.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Adrian Cochrane 2016-01-12 13:11:03 +13:00 committed by Andrew Bartlett
parent 1d05f3bae7
commit 10e32377a4
2 changed files with 5 additions and 3 deletions

View File

@ -228,7 +228,7 @@ static int ldb_eval_transitive_filter(TALLOC_CTX *mem_ctx,
dn_to_match = dsdb_dn_parse(mem_ctx, ldb, value_to_match, dn_oid);
if (dn_to_match == NULL) {
*matched = false;
return LDB_ERR_INVALID_DN_SYNTAX;
return LDB_SUCCESS;
}
return ldb_eval_transitive_filter_helper(mem_ctx, ldb, attr,
@ -292,8 +292,9 @@ static int ldb_comparator_trans(struct ldb_context *ldb,
* mailing list.
*/
if (schema_attr->linkID == 0) {
*matched = false;
talloc_free(tmp_ctx);
return LDB_ERR_INAPPROPRIATE_MATCHING;
return LDB_SUCCESS;
}
/* Duplicate original msg dn as the msg must not be modified */

View File

@ -503,9 +503,10 @@ static int ldb_match_extended(struct ldb_context *ldb,
rule = ldb_find_extended_match_rule(ldb, tree->u.extended.rule_id);
if (rule == NULL) {
*matched = false;
ldb_debug(ldb, LDB_DEBUG_ERROR, "ldb: unknown extended rule_id %s",
tree->u.extended.rule_id);
return LDB_ERR_INAPPROPRIATE_MATCHING;
return LDB_SUCCESS;
}
return rule->callback(ldb, rule->oid, msg,