]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb/schema: avoid an implicit prefix map creation in lookup functions
authorStefan Metzmacher <metze@samba.org>
Mon, 8 Aug 2016 09:11:20 +0000 (11:11 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 10 Aug 2016 22:49:14 +0000 (00:49 +0200)
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 <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dsdb/schema/schema_init.c
source4/dsdb/schema/schema_syntax.c

index c9c55cabc29a3dba70cba48b7d92625727c8e10b..c1cf466493ae982253a3d24842da27245fd400b1 100644 (file)
@@ -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,
index 5b7c8b13d807e8c90d1af3a9309916e5de718fd3..e3f1421e544eded21ca8020bf939885c4f95714d 100644 (file)
@@ -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;