summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-15 11:46:59 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-15 18:45:42 -0700
commitbc3bbae6d28c79706b83b7e3f5457674b98d4a74 (patch)
tree7fbb732378f86604517bbf863d5cedcae45ca9ca /source4/dsdb/samdb/ldb_modules
parentff8ad222cd1ec26f0e29e409525e16d3b0f1b8c4 (diff)
downloadsamba-bc3bbae6d28c79706b83b7e3f5457674b98d4a74.tar.gz
samba-bc3bbae6d28c79706b83b7e3f5457674b98d4a74.tar.bz2
samba-bc3bbae6d28c79706b83b7e3f5457674b98d4a74.zip
s4-repl: make sure we marshal the replPropertyMetaData after the last change
we were setting local_usn after the marshall, so it wasn't going into the object
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index f9411fe95f..26703528a7 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1352,16 +1352,6 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
replmd_replPropertyMetaDataCtr1_sort(&nmd.ctr.ctr1, &rdn_p->attid);
}
- /* create the meta data value */
- ndr_err = ndr_push_struct_blob(&nmd_value, msg,
- lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
- &nmd,
- (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
- return replmd_replicated_request_werror(ar, ntstatus_to_werror(nt_status));
- }
-
/*
* check if some replicated attributes left, otherwise skip the ldb_modify() call
*/
@@ -1385,6 +1375,16 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar)
nmd.ctr.ctr1.array[i].local_usn = seq_num;
}
+ /* create the meta data value */
+ ndr_err = ndr_push_struct_blob(&nmd_value, msg,
+ lp_iconv_convenience(ldb_get_opaque(ldb, "loadparm")),
+ &nmd,
+ (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
+ return replmd_replicated_request_werror(ar, ntstatus_to_werror(nt_status));
+ }
+
/*
* when we know that we'll modify the record, add the whenChanged, uSNChanged
* and replPopertyMetaData attributes