s4:subtree_rename.c - relax the checks when requested
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 15 Aug 2010 07:24:22 +0000 (09:24 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 15 Aug 2010 07:24:22 +0000 (09:24 +0200)
(Needed by upgradeprovision for example)

source4/dsdb/samdb/ldb_modules/subtree_rename.c

index ef27eca395f88b518b640ca12d552a4f78cc1eab..3f030509b0074c42d00281b992af7708672bce74 100644 (file)
@@ -151,9 +151,14 @@ static int check_constraints(struct ldb_message *msg,
        bool move_op = false;
        bool rename_op = false;
 
+       /* Skip the checks if old and new DN are the same or if we relax */
+
        if (ldb_dn_compare(olddn, newdn) == 0) {
                return LDB_SUCCESS;
        }
+       if (ldb_request_get_control(ac->req, LDB_CONTROL_RELAX_OID) != NULL) {
+               return LDB_SUCCESS;
+       }
 
        /* Objects under CN=System */