summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-08-17 12:04:45 +1000
committerAndrew Tridgell <tridge@samba.org>2010-08-17 21:21:50 +1000
commit0caf347098913e9d224d1db4b48887e2b78bae03 (patch)
tree0b1b41f7f3d93be8c449d9dfac25186b9cd20b9e /source4/dsdb
parent9e27201b24106babc7ac2400f7f063f438b0ddcd (diff)
downloadsamba-0caf347098913e9d224d1db4b48887e2b78bae03.tar.gz
samba-0caf347098913e9d224d1db4b48887e2b78bae03.tar.bz2
samba-0caf347098913e9d224d1db4b48887e2b78bae03.zip
s4-ldb: added LDB_FLAG_INTERNAL_DISABLE_VALIDATION
When this flag is set on an element in an add/modify request then the normal validate_ldb() call that checks the element against schema constraints is disabled Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass_attrs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index b9436e3a04..070d8585ae 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -113,13 +113,15 @@ static int attr_handler(struct oc_context *ac)
return LDB_ERR_UNWILLING_TO_PERFORM;
}
- werr = attr->syntax->validate_ldb(ldb, ac->schema, attr,
- &msg->elements[i]);
- if (!W_ERROR_IS_OK(werr)) {
- ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' contains at least one invalid value!",
- msg->elements[i].name,
- ldb_dn_get_linearized(msg->dn));
- return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+ if (!(msg->elements[i].flags & LDB_FLAG_INTERNAL_DISABLE_VALIDATION)) {
+ werr = attr->syntax->validate_ldb(ldb, ac->schema, attr,
+ &msg->elements[i]);
+ if (!W_ERROR_IS_OK(werr)) {
+ ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' contains at least one invalid value!",
+ msg->elements[i].name,
+ ldb_dn_get_linearized(msg->dn));
+ return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+ }
}
if ((attr->systemFlags & DS_FLAG_ATTR_IS_CONSTRUCTED) != 0) {