diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-16 16:39:49 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-16 21:10:52 +1100 |
commit | 018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47 (patch) | |
tree | 5877688c645dd02075155a63dd4a5811e329a237 /source4/dsdb | |
parent | 86f8ddf75458582195954cd0b3ad3dcea28c9d0f (diff) | |
download | samba-018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47.tar.gz samba-018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47.tar.bz2 samba-018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47.zip |
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>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/common/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |