From 74530d6453451d7a7ad08a11e37ea8b4672fc4ab Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Thu, 7 Jul 2011 00:32:32 +0400 Subject: s4-dsdb: allow objectsid to be specified in a modification operation if we have the provision control, it's used by dbcheck Signed-off-by: Andrew Tridgell --- source4/dsdb/samdb/ldb_modules/samldb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 6533d1006b..a61920f2af 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -2035,9 +2035,11 @@ static int samldb_modify(struct ldb_module *module, struct ldb_request *req) /* make sure that "objectSid" is not specified */ el = ldb_msg_find_element(req->op.mod.message, "objectSid"); if (el != NULL) { - ldb_set_errstring(ldb, - "samldb: objectSid must not be specified!"); - return LDB_ERR_UNWILLING_TO_PERFORM; + if (ldb_request_get_control(req, LDB_CONTROL_PROVISION_OID) == NULL) { + ldb_set_errstring(ldb, + "samldb: objectSid must not be specified!"); + return LDB_ERR_UNWILLING_TO_PERFORM; + } } /* make sure that "sAMAccountType" is not specified */ el = ldb_msg_find_element(req->op.mod.message, "sAMAccountType"); -- cgit