diff options
author | Matthieu Patou <mat@matws.net> | 2011-07-07 00:32:32 +0400 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-11 14:32:45 +1000 |
commit | 74530d6453451d7a7ad08a11e37ea8b4672fc4ab (patch) | |
tree | 4b0348ca0f39d9e60c584b69ad4e3918bcb3f426 /source4/dsdb | |
parent | 61fc7f285eee888e3603afd7beafba83cca4e378 (diff) | |
download | samba-74530d6453451d7a7ad08a11e37ea8b4672fc4ab.tar.gz samba-74530d6453451d7a7ad08a11e37ea8b4672fc4ab.tar.bz2 samba-74530d6453451d7a7ad08a11e37ea8b4672fc4ab.zip |
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 <tridge@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 8 |
1 files changed, 5 insertions, 3 deletions
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"); |