From b755ec74e17e9a5ed746af0a2716effe3176965a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 8 Aug 2016 11:11:20 +0200 Subject: [PATCH] s4:dsdb/schema: avoid an implicit prefix map creation in lookup functions dsdb_create_prefix_mapping() should be the only place that calls dsdb_schema_pfm_make_attid(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source4/dsdb/schema/schema_init.c | 8 ++++---- source4/dsdb/schema/schema_syntax.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index c9c55cabc29..c1cf466493a 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -639,7 +639,7 @@ WERROR dsdb_attribute_from_ldb(const struct dsdb_schema *schema, /* set an invalid value */ attr->attributeID_id = DRSUAPI_ATTID_INVALID; } else { - status = dsdb_schema_pfm_make_attid(schema->prefixmap, + status = dsdb_schema_pfm_attid_from_oid(schema->prefixmap, attr->attributeID_oid, &attr->attributeID_id); if (!W_ERROR_IS_OK(status)) { @@ -793,9 +793,9 @@ WERROR dsdb_set_class_from_ldb_dups(struct dsdb_schema *schema, /* set an invalid value */ obj->governsID_id = DRSUAPI_ATTID_INVALID; } else { - status = dsdb_schema_pfm_make_attid(schema->prefixmap, - obj->governsID_oid, - &obj->governsID_id); + status = dsdb_schema_pfm_attid_from_oid(schema->prefixmap, + obj->governsID_oid, + &obj->governsID_id); if (!W_ERROR_IS_OK(status)) { DEBUG(0,("%s: '%s': unable to map governsID %s: %s\n", __location__, obj->lDAPDisplayName, obj->governsID_oid, diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index 5b7c8b13d80..e3f1421e544 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -97,7 +97,7 @@ static bool dsdb_syntax_attid_from_remote_attid(const struct dsdb_syntax_ctx *ct return false; } - werr = dsdb_schema_pfm_make_attid(ctx->schema->prefixmap, oid, id_local); + werr = dsdb_schema_pfm_attid_from_oid(ctx->schema->prefixmap, oid, id_local); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,("OID->ATTID failed (%s) for: %s\n", win_errstr(werr), oid)); return false; -- 2.11.4.GIT