Remove compleatly bogus rename test in partitions module.
authorAndrew Bartlett <abartlet@samba.org>
Sat, 4 Oct 2008 17:25:46 +0000 (10:25 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 6 Oct 2008 21:16:30 +0000 (14:16 -0700)
source4/dsdb/samdb/ldb_modules/partition.c

index 8e4483a78e375c81a9db5bffba4118bd48320f04..b452b66d569f8057453f1c58014190131d8b7ccb 100644 (file)
@@ -589,7 +589,6 @@ static int partition_delete(struct ldb_module *module, struct ldb_request *req)
 /* rename */
 static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 {
-       int i, matched = -1;
        /* Find backend */
        struct dsdb_control_current_partition *backend, *backend2;
        
@@ -619,22 +618,6 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
                return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
        }
 
-       for (i=0; data && data->partitions && data->partitions[i]; i++) {
-               if (ldb_dn_compare_base(data->partitions[i]->dn, req->op.rename.olddn) == 0) {
-                       matched = i;
-               }
-       }
-
-       if (matched > 0) {
-               ldb_asprintf_errstring(module->ldb, 
-                                      "Cannot rename from %s to %s, subtree rename would cross partition %s: %s",
-                                      ldb_dn_get_linearized(req->op.rename.olddn),
-                                      ldb_dn_get_linearized(req->op.rename.newdn),
-                                      ldb_dn_get_linearized(data->partitions[matched]->dn),
-                                      ldb_strerror(LDB_ERR_AFFECTS_MULTIPLE_DSAS));
-               return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
-       }
-
        return partition_replicate(module, req, req->op.rename.olddn);
 }