s4:dsdb - introduce a only constant-time "get_last_structural_class()" call
[nivanova/samba-autobuild/.git] / source4 / dsdb / samdb / ldb_modules / objectclass.c
index b8422ee86ec8f235b4d10130bcc1f09c562e6c33..033330c86c2859ff78789c2d6640ddd64b57a72c 100644 (file)
@@ -470,8 +470,7 @@ static int objectclass_do_add(struct oc_context *ac)
                 * unrelated structural classes
                 */
                objectclass = get_last_structural_class(ac->schema,
-                                                       objectclass_element,
-                                                       true);
+                                                       objectclass_element);
                if (objectclass == NULL) {
                        ldb_asprintf_errstring(ldb,
                                               "Failed to find a structural class for %s",
@@ -955,8 +954,7 @@ static int objectclass_do_mod(struct oc_context *ac)
                 * Get the new top-most structural object class and check for
                 * unrelated structural classes
                 */
-               objectclass = get_last_structural_class(ac->schema, oc_el_entry,
-                                                       true);
+               objectclass = get_last_structural_class(ac->schema, oc_el_entry);
                if (objectclass == NULL) {
                        ldb_set_errstring(ldb,
                                          "objectclass: cannot delete all structural objectclasses!");
@@ -1132,8 +1130,7 @@ static int objectclass_do_rename2(struct oc_context *ac)
                        /* existing entry without a valid object class? */
                        return ldb_operr(ldb);
                }
-               objectclass = get_last_structural_class(ac->schema, oc_el_entry,
-                                                       false);
+               objectclass = get_last_structural_class(ac->schema, oc_el_entry);
                if (objectclass == NULL) {
                        /* existing entry without a valid object class? */
                        return ldb_operr(ldb);