summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-12-11 01:59:05 +0200
committerKamen Mazdrashki <kamenim@samba.org>2010-12-15 00:51:19 +0100
commitdda73b85e6e7102a2de6a020f1271140bf8f3aaf (patch)
tree808b0a284d53d1b01c75a4b9ae07b4f908239d35 /source4/dsdb
parent52f7e38d6a350cfd645371c82a8c2b189cf7531f (diff)
downloadsamba-dda73b85e6e7102a2de6a020f1271140bf8f3aaf.tar.gz
samba-dda73b85e6e7102a2de6a020f1271140bf8f3aaf.tar.bz2
samba-dda73b85e6e7102a2de6a020f1271140bf8f3aaf.zip
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
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/schema/schema_syntax.c21
1 files changed, 17 insertions, 4 deletions
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);