summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-04 20:02:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-04 20:35:44 +1100
commitcf37c29cd009f9378ffa4d3ee54b38aef9fa066b (patch)
treeb62d8d7f70c1881e8e06afc42b703f6fcd1ed387 /source4/dsdb/samdb
parentf3ad867ab57bfedada5e11cfaa15707f6a455d63 (diff)
downloadsamba-cf37c29cd009f9378ffa4d3ee54b38aef9fa066b.tar.gz
samba-cf37c29cd009f9378ffa4d3ee54b38aef9fa066b.tar.bz2
samba-cf37c29cd009f9378ffa4d3ee54b38aef9fa066b.zip
Move the checking of single valued attributes back into the tdb backend.
The backend is the only place that can do this properly. It makes no sense to do it anywhere else. As a result of it moving out of the backend we ended up with some bugs causing multiple values in single valued attributes (eg. isDeleted), which can really damage the inregrity of the database. For the override of single valued values needed for deleted linked attributes we should use attribute flags. This reverts commit 1949864417f3d10fb8996df7db259649eb777271.
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass_attrs.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index 62bc9ae8b2..ed193491d1 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -296,18 +296,6 @@ static int attr_handler2(struct oc_context *ac)
return ldb_operr(ldb);
}
- /* Check if they're single-valued if this is requested */
- if ((msg->elements[i].num_values > 1) && (attr->isSingleValued)) {
- ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' is single-valued!",
- msg->elements[i].name,
- ldb_dn_get_linearized(msg->dn));
- if (ac->req->operation == LDB_ADD) {
- return LDB_ERR_CONSTRAINT_VIOLATION;
- } else {
- return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
- }
- }
-
/* We can use "str_list_check" with "strcmp" here since the
* attribute informations from the schema are always equal
* up-down-cased. */