summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/ldb_tdb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 4049900a23..6623fd0052 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -516,8 +516,13 @@ int ltdb_modify_internal(struct ldb_module *module, const struct ldb_message *ms
already exists */
ret = find_element(&msg2, msg->elements[i].name);
if (ret != -1) {
- ltdb->last_err_string = "Attribute exists";
- goto failed;
+ for (j=0;j<msg->elements[i].num_values;j++) {
+ if (ldb_msg_find_val(&msg2.elements[ret],
+ &msg->elements[i].values[j])) {
+ ltdb->last_err_string = "Type or value exists";
+ goto failed;
+ }
+ }
}
if (msg_add_element(ldb, &msg2, &msg->elements[i]) != 0) {
goto failed;