From daeb6a02eab5822c557ab167fbc171aebe2ddf05 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 Mar 2011 16:14:18 +1100 Subject: s4-dsdb: allow modification of linked attribute targets with relax this is used to help recover a corrupt database. Pair-Programmed-With: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules/objectclass_attrs.c') diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c index 8f6cc669ba..9df121002f 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c @@ -127,7 +127,8 @@ static int attr_handler(struct oc_context *ac) return LDB_ERR_NO_SUCH_ATTRIBUTE; } - if ((attr->linkID & 1) == 1) { + if ((attr->linkID & 1) == 1 && + !ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID)) { /* Odd is for the target. Illegal to modify */ ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' must not be modified directly, it is a linked attribute", -- cgit