From 21729fff115046ede3a316028b6a4e95cc7c590b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 13 Jan 2007 11:37:13 +0000 Subject: r20729: add a version number to struct dsdb_extended_replicated_objects metze (This used to be commit 2e79863d54030526841e5858e7be6a815c25593b) --- source4/dsdb/samdb/ldb_modules/partition.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules/partition.c') diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 31150b5f7b..6ed113857d 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -571,7 +571,14 @@ static int partition_extended_replicated_objects(struct ldb_module *module, stru ext = talloc_get_type(req->op.extended.data, struct dsdb_extended_replicated_objects); if (!ext) { - return LDB_ERR_OTHER; + ldb_debug(module->ldb, LDB_DEBUG_FATAL, "partition_extended_replicated_objects: invalid extended data\n"); + return LDB_ERR_PROTOCOL_ERROR; + } + + if (ext->version != DSDB_EXTENDED_REPLICATED_OBJECTS_VERSION) { + ldb_debug(module->ldb, LDB_DEBUG_FATAL, "partition_extended_replicated_objects: extended data invalid version [%u != %u]\n", + ext->version, DSDB_EXTENDED_REPLICATED_OBJECTS_VERSION); + return LDB_ERR_PROTOCOL_ERROR; } return partition_replicate(module, req, ext->partition_dn); -- cgit