summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-08-05 08:53:11 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-08-05 08:56:06 +1000
commit43aa546ecc3f05845793b1a7354685d50a77c170 (patch)
tree282c318ee900ba81ee91fe95328871d175b24cd6 /source4/dsdb/samdb/ldb_modules/schema_fsmo.c
parent25a65d604676b25f97ca427b805d151c1a40a07e (diff)
downloadsamba-43aa546ecc3f05845793b1a7354685d50a77c170.tar.gz
samba-43aa546ecc3f05845793b1a7354685d50a77c170.tar.bz2
samba-43aa546ecc3f05845793b1a7354685d50a77c170.zip
s4:dsdb Don't cast an ldb_val into a const char * for schema lookups
This removes a number of cases where we did a cast into a const char * of an ldb_val. While convention is to alway have an extra \0 at data[length] in the ldb_val, this is not required, and does not occour at least on build farm host 'svart'. Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/schema_fsmo.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_fsmo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
index 1b8f786c35..290232bdb9 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_fsmo.c
@@ -417,9 +417,8 @@ static int generate_possibleInferiors(struct ldb_context *ldb, struct ldb_messag
}
first_component_val = ldb_dn_get_component_val(dn, 0);
- class_name = (const char *)first_component_val->data;
- schema_class = dsdb_class_by_cn(schema, class_name);
+ schema_class = dsdb_class_by_cn_ldb_val(schema, first_component_val);
if (schema_class == NULL) {
return LDB_SUCCESS;
}