1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1

In a single record search, LDB_ERR_CONSTRAINT_VIOLATION is more useful
than the generic LDB_ERR_OPERATIONS_ERROR

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell 2010-02-16 16:39:49 +11:00
parent 86f8ddf754
commit 018fb2d1ae

@ -3443,7 +3443,7 @@ int dsdb_search(struct ldb_context *ldb,
}
if (res->count != 1) {
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
return LDB_ERR_CONSTRAINT_VIOLATION;
}
}