diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-03-29 16:14:18 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-03-29 07:37:04 +0200 |
commit | daeb6a02eab5822c557ab167fbc171aebe2ddf05 (patch) | |
tree | d30f08d0b09254d8ea33fd3c2c07b79f37c54bfa /source4/dsdb | |
parent | af31bf6bf5ef3af6eaf87ebe2f9f5903698c22db (diff) | |
download | samba-daeb6a02eab5822c557ab167fbc171aebe2ddf05.tar.gz samba-daeb6a02eab5822c557ab167fbc171aebe2ddf05.tar.bz2 samba-daeb6a02eab5822c557ab167fbc171aebe2ddf05.zip |
s4-dsdb: allow modification of linked attribute targets with relax
this is used to help recover a corrupt database.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 3 |
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 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", |