summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_syntax.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-03-10 13:43:15 +1300
committerStefan Metzmacher <metze@samba.org>2016-03-13 23:29:14 +0100
commit6ecfc4cb254f9b2524ec5619ed8cee9db5d959b2 (patch)
tree8b616dd6d09206c956ab19dae70be1d01e7e4b51 /source4/dsdb/schema/schema_syntax.c
parent43353713231d3f0fb588378c69472b0b845b262f (diff)
downloadsamba-6ecfc4cb254f9b2524ec5619ed8cee9db5d959b2.tar.gz
dsdb/repl: Ensure we use the LOCAL attid value, not the remote one
The key here is that while this never was an issue for builtin schema, nor for objects with an msDS-IntID used outside the schema partition, additional attributes added and used in the schema partition were incorrectly using the wrong attributeID value in the replPropertyMetaData. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11783 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Mar 13 23:29:14 CET 2016 on sn-devel-144
Diffstat (limited to 'source4/dsdb/schema/schema_syntax.c')
-rw-r--r--source4/dsdb/schema/schema_syntax.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 94e319c11f3..5b7c8b13d80 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -2702,7 +2702,8 @@ WERROR dsdb_attribute_drsuapi_to_ldb(struct ldb_context *ldb,
const struct dsdb_schema_prefixmap *pfm_remote,
const struct drsuapi_DsReplicaAttribute *in,
TALLOC_CTX *mem_ctx,
- struct ldb_message_element *out)
+ struct ldb_message_element *out,
+ enum drsuapi_DsAttributeId *local_attid_as_enum)
{
const struct dsdb_attribute *sa;
struct dsdb_syntax_ctx syntax_ctx;
@@ -2738,6 +2739,15 @@ WERROR dsdb_attribute_drsuapi_to_ldb(struct ldb_context *ldb,
return WERR_DS_ATT_NOT_DEF_IN_SCHEMA;
}
+ /*
+ * We return the same class of attid as we were given. That
+ * is, we trust the remote server not to use an
+ * msDS-IntId value in the schema partition
+ */
+ if (local_attid_as_enum != NULL) {
+ *local_attid_as_enum = (enum drsuapi_DsAttributeId)attid_local;
+ }
+
return sa->syntax->drsuapi_to_ldb(&syntax_ctx, sa, in, mem_ctx, out);
}