summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/objectclass.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-04-04 18:55:40 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-04-11 12:50:16 +1000
commit3fa5f84d2f7bdd3747ea14453fc49eb6931eeedf (patch)
tree3876653102c8225d5f0820b211d76fff0d088f49 /source4/dsdb/samdb/ldb_modules/objectclass.c
parentba96b2491e106dd9035d3b3b1f95cb81412e0847 (diff)
downloadsamba-3fa5f84d2f7bdd3747ea14453fc49eb6931eeedf.tar.gz
samba-3fa5f84d2f7bdd3747ea14453fc49eb6931eeedf.tar.bz2
samba-3fa5f84d2f7bdd3747ea14453fc49eb6931eeedf.zip
s4:dsdb - introduce a only constant-time "get_last_structural_class()" call
With the redesign of the previous patches this has become possible.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/objectclass.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index b8422ee86e..033330c86c 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -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);