From 018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 16 Feb 2010 16:39:49 +1100 Subject: 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 --- source4/dsdb/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 2031aa9def..6cdede1f22 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -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; } } -- cgit