summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-18 12:47:31 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:50 +1100
commitf1b6484232cbcd31056b8f905f3b111d0c9069b0 (patch)
treedc3d8f914037861834113b93fba6557c0ff21237 /source4/dsdb/samdb
parente4a6f5c8b8de0429578cd09913f1d41d0a1fd82f (diff)
downloadsamba-f1b6484232cbcd31056b8f905f3b111d0c9069b0.tar.gz
samba-f1b6484232cbcd31056b8f905f3b111d0c9069b0.tar.bz2
samba-f1b6484232cbcd31056b8f905f3b111d0c9069b0.zip
s4-dsdb: split RMD_USN into RMD_LOCAL_USN and RMD_ORIGINATING_USN
We need a separate RMD_LOCAL_USN to allow us to tell what attributes need to be sent in a getncchanges request. Thanks to Metze for pointing this out. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index e184181f01..822ed8868d 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1172,12 +1172,13 @@ static int get_parsed_dns(struct ldb_module *module, TALLOC_CTX *mem_ctx,
/*
build a new extended DN, including all meta data fields
- DELETED = 1 or missing
- RMD_ADDTIME = originating_add_time
- RMD_INVOCID = originating_invocation_id
- RMD_CHANGETIME = originating_change_time
- RMD_USN = originating_usn
- RMD_VERSION = version
+ DELETED = 1 or missing
+ RMD_ADDTIME = originating_add_time
+ RMD_INVOCID = originating_invocation_id
+ RMD_CHANGETIME = originating_change_time
+ RMD_ORIGINATING_USN = originating_usn
+ RMD_LOCAL_USN = local_usn
+ RMD_VERSION = version
*/
static int replmd_build_la_val(TALLOC_CTX *mem_ctx, struct ldb_val *v, struct dsdb_dn *dsdb_dn,
const struct GUID *invocation_id, uint64_t seq_num, time_t t)
@@ -1221,7 +1222,9 @@ static int replmd_build_la_val(TALLOC_CTX *mem_ctx, struct ldb_val *v, struct ds
if (ret != LDB_SUCCESS) return ret;
ret = ldb_dn_set_extended_component(dn, "RMD_CHANGETIME", &tval);
if (ret != LDB_SUCCESS) return ret;
- ret = ldb_dn_set_extended_component(dn, "RMD_USN", &usnv);
+ ret = ldb_dn_set_extended_component(dn, "RMD_LOCAL_USN", &usnv);
+ if (ret != LDB_SUCCESS) return ret;
+ ret = ldb_dn_set_extended_component(dn, "RMD_ORIGINATING_USN", &usnv);
if (ret != LDB_SUCCESS) return ret;
ret = ldb_dn_set_extended_component(dn, "RMD_VERSION", &vers);
if (ret != LDB_SUCCESS) return ret;
@@ -1303,7 +1306,10 @@ static int replmd_update_la_val(TALLOC_CTX *mem_ctx, struct ldb_val *v, struct d
if (ret != LDB_SUCCESS) return ret;
/* update the USN */
- ret = ldb_dn_set_extended_component(dn, "RMD_USN", &usnv);
+ ret = ldb_dn_set_extended_component(dn, "RMD_ORIGINATING_USN", &usnv);
+ if (ret != LDB_SUCCESS) return ret;
+
+ ret = ldb_dn_set_extended_component(dn, "RMD_LOCAL_USN", &usnv);
if (ret != LDB_SUCCESS) return ret;
/* increase the version by 1 */