summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-06-22 18:14:14 +1000
committerAndrew Tridgell <tridge@samba.org>2011-06-22 12:27:06 +0200
commita353b49047a54461a1b4fd3c5f232adcea5fbeaf (patch)
treef82e47c373ebdb2d9f4c592675d42a3049f05c09 /source4/dsdb/samdb/ldb_modules
parent6d1fe054dd93b8d282fcf515fc62f5d5ab72e6a8 (diff)
downloadsamba-a353b49047a54461a1b4fd3c5f232adcea5fbeaf.tar.gz
samba-a353b49047a54461a1b4fd3c5f232adcea5fbeaf.tar.bz2
samba-a353b49047a54461a1b4fd3c5f232adcea5fbeaf.zip
s4-dsdb: bypass validation when relax set
this allows dbcheck to fix bad attributes Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Jun 22 12:27:06 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass_attrs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index 9df121002f..5639a7a3e3 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -140,7 +140,8 @@ static int attr_handler(struct oc_context *ac)
if (!(msg->elements[i].flags & LDB_FLAG_INTERNAL_DISABLE_VALIDATION)) {
werr = attr->syntax->validate_ldb(&syntax_ctx, attr,
&msg->elements[i]);
- if (!W_ERROR_IS_OK(werr)) {
+ if (!W_ERROR_IS_OK(werr) &&
+ !ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID)) {
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));