diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 2 | ||||
-rw-r--r-- | source4/dsdb/schema/schema.h | 2 | ||||
-rw-r--r-- | source4/dsdb/schema/schema_init.c | 6 |
3 files changed, 4 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 5af951aff5..661060d755 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -273,7 +273,7 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms if (schema && do_attribute_explicit(attrs, "dsSchemaPrefixCount")) { if (ldb_msg_add_fmt(msg, "dsSchemaPrefixCount", - "%u", schema->num_prefixes) != 0) { + "%u", schema->prefixmap->length) != 0) { goto failed; } } diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h index 6c9ec96dfe..f3ba25c864 100644 --- a/source4/dsdb/schema/schema.h +++ b/source4/dsdb/schema/schema.h @@ -165,8 +165,6 @@ struct dsdb_schema_oid_prefix { }; struct dsdb_schema { - uint32_t num_prefixes; - struct dsdb_schema_oid_prefix *prefixes; struct dsdb_schema_prefixmap *prefixmap; diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 83695b354b..412ff0ceb3 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -639,7 +639,7 @@ WERROR dsdb_attribute_from_ldb(struct ldb_context *ldb, GET_STRING_LDB(msg, "cn", mem_ctx, attr, cn, false); GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, attr, lDAPDisplayName, true); GET_STRING_LDB(msg, "attributeID", mem_ctx, attr, attributeID_oid, true); - if (schema->num_prefixes == 0) { + if (!schema->prefixmap || schema->prefixmap->length == 0) { /* set an invalid value */ attr->attributeID_id = 0xFFFFFFFF; } else { @@ -664,7 +664,7 @@ WERROR dsdb_attribute_from_ldb(struct ldb_context *ldb, GET_UINT32_LDB(msg, "linkID", attr, linkID); GET_STRING_LDB(msg, "attributeSyntax", mem_ctx, attr, attributeSyntax_oid, true); - if (schema->num_prefixes == 0) { + if (!schema->prefixmap || schema->prefixmap->length == 0) { /* set an invalid value */ attr->attributeSyntax_id = 0xFFFFFFFF; } else { @@ -719,7 +719,7 @@ WERROR dsdb_class_from_ldb(const struct dsdb_schema *schema, GET_STRING_LDB(msg, "cn", mem_ctx, obj, cn, false); GET_STRING_LDB(msg, "lDAPDisplayName", mem_ctx, obj, lDAPDisplayName, true); GET_STRING_LDB(msg, "governsID", mem_ctx, obj, governsID_oid, true); - if (schema->num_prefixes == 0) { + if (!schema->prefixmap || schema->prefixmap->length == 0) { /* set an invalid value */ obj->governsID_id = 0xFFFFFFFF; } else { |