git.samba.org
/
bjacke
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86f8ddf
)
s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1
author
Andrew Tridgell
<tridge@samba.org>
Tue, 16 Feb 2010 05:39:49 +0000
(16:39 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 16 Feb 2010 10:10:52 +0000
(21:10 +1100)
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>
source4/dsdb/common/util.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/common/util.c
b/source4/dsdb/common/util.c
index 2031aa9def063577d9808661f5187bb7c0fb6a46..6cdede1f223aa170cc44d1e606657752c58474f4 100644
(file)
--- 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
;
}
}