diff options
author | Matthieu Patou <mat@matws.net> | 2011-07-03 22:06:34 +0400 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-11 14:32:44 +1000 |
commit | 3764b93b7c9df4bcc03e4fbf2e1acb5f7a3d268d (patch) | |
tree | 7d7668c4632eb9ae8e1212a8833b14f113480583 /source4/dsdb | |
parent | e14725c8fe4c257d9951d48d3093ecb9916abfae (diff) | |
download | samba-3764b93b7c9df4bcc03e4fbf2e1acb5f7a3d268d.tar.gz samba-3764b93b7c9df4bcc03e4fbf2e1acb5f7a3d268d.tar.bz2 samba-3764b93b7c9df4bcc03e4fbf2e1acb5f7a3d268d.zip |
s4-dsdb: check for single valued attribute in repl_meta_data module
This is needed because we can have more than 1 value in a single valued
attribute as we store also deleted values. So we do the check in repl_meta_data
and then indicate LDB to do the check.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 830c118945..2363260963 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -2168,6 +2168,17 @@ static int replmd_modify_handle_linked_attribs(struct ldb_module *module, el->flags, el->name); return LDB_ERR_UNWILLING_TO_PERFORM; } + if (dsdb_check_single_valued_link(schema_attr, el) != LDB_SUCCESS) { + ldb_asprintf_errstring(ldb, + "Attribute %s is single valued but more than one value has been supplied", + el->name); + return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS; + } else { + el->flags |= LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK; + } + + + if (ret != LDB_SUCCESS) { return ret; } |