From dda73b85e6e7102a2de6a020f1271140bf8f3aaf Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sat, 11 Dec 2010 01:59:05 +0200 Subject: s4-dsdb_schema: Handle remote ATTIDs based on msDs-IntId value If we get such an msDs-IntId value, then we should just use it, there is no mapping available for such values --- source4/dsdb/schema/schema_syntax.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'source4/dsdb/schema') diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index 3f2d3bb62d..1bb9a4f785 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -2652,11 +2652,24 @@ WERROR dsdb_attribute_drsuapi_to_ldb(struct ldb_context *ldb, dsdb_syntax_ctx_init(&syntax_ctx, ldb, schema); syntax_ctx.pfm_remote = pfm_remote; - /* map remote ATTID to local ATTID */ - if (!dsdb_syntax_attid_from_remote_attid(&syntax_ctx, mem_ctx, in->attid, &attid_local)) { - DEBUG(0,(__location__ "Error: Can't find local ATTID for 0x%08X\n", + switch (dsdb_pfm_get_attid_type(in->attid)) { + case DSDB_ATTID_TYPE_PFM: + /* map remote ATTID to local ATTID */ + if (!dsdb_syntax_attid_from_remote_attid(&syntax_ctx, mem_ctx, in->attid, &attid_local)) { + DEBUG(0,(__location__ ": Can't find local ATTID for 0x%08X\n", + in->attid)); + return WERR_FOOBAR; + } + break; + case DSDB_ATTID_TYPE_INTID: + /* use IntId value directly */ + attid_local = in->attid; + break; + default: + /* we should never get here */ + DEBUG(0,(__location__ ": Invalid ATTID type passed for conversion - 0x%08X\n", in->attid)); - return WERR_FOOBAR; + return WERR_INVALID_PARAMETER; } sa = dsdb_attribute_by_attributeID_id(schema, attid_local); -- cgit