r25762: This test belongs best with the other checks for a valid parent, in
[jra/samba/.git] / source4 / dsdb / samdb / ldb_modules / subtree_rename.c
index 5c287233918a8f3475c96daccc0050fe76542d72..72857cb864e7c5bc63f48a9b593781bd36aeec7c 100644 (file)
@@ -163,14 +163,6 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
                return ldb_next_request(module, req);
        }
 
-       /* Firstly ensure we are not trying to rename it to be a child of itself */
-       if ((ldb_dn_compare_base(req->op.rename.olddn, req->op.rename.newdn) == 0) 
-           && (ldb_dn_compare(req->op.rename.olddn, req->op.rename.newdn) != 0)) {
-               ldb_asprintf_errstring(module->ldb, "Cannot rename %s to be a child of itself",
-                                      ldb_dn_get_linearized(req->op.rename.olddn));
-               return LDB_ERR_UNWILLING_TO_PERFORM;
-       }
-
        /* This gets complex:  We need to:
           - Do a search for all entires under this entry 
           - Wait for these results to appear