diff options
author | Kamen Mazdrashki <kamen.mazdrashki@postpath.com> | 2009-10-29 16:24:00 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-11-06 14:05:49 +0100 |
commit | db82023af24ef89afe1559422ac5899646afff32 (patch) | |
tree | d1a86ec15d144b3842d78bfec89be3f1e2de19c7 /source4/dsdb | |
parent | 2fa4c4dceec67a85c40f37c992f5a603aada47c0 (diff) | |
download | samba-db82023af24ef89afe1559422ac5899646afff32.tar.gz samba-db82023af24ef89afe1559422ac5899646afff32.tar.bz2 samba-db82023af24ef89afe1559422ac5899646afff32.zip |
s4/drs: remove unused num_prefixes and prefixes from dsdb_schema
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/dsdb')
-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 { |