summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-30 12:43:45 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-30 14:36:12 -0700
commit75a542a1d93f6f015d866a01d25d5978e9b32583 (patch)
tree1cef8b698dd5b97324c49da687b3343bc42e0c42 /source4/rpc_server/drsuapi
parent87f67d336919172845f53067c67d1eab8e7ef18a (diff)
downloadsamba-75a542a1d93f6f015d866a01d25d5978e9b32583.tar.gz
samba-75a542a1d93f6f015d866a01d25d5978e9b32583.tar.bz2
samba-75a542a1d93f6f015d866a01d25d5978e9b32583.zip
s4-drs: put the GCSPN flag into the repsTo if requested
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c6
-rw-r--r--source4/rpc_server/drsuapi/updaterefs.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index c04a8c7450..54b04307ab 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -1589,6 +1589,12 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
ureq.options = DRSUAPI_DRS_ADD_REF |
DRSUAPI_DRS_ASYNC_OP |
DRSUAPI_DRS_GETCHG_CHECK;
+
+ /* we also need to pass through the
+ DRSUAPI_DRS_REF_GCSPN bit so that repsTo gets flagged
+ to send notifies using the GC SPN */
+ ureq.options |= (req10->replica_flags & DRSUAPI_DRS_REF_GCSPN);
+
werr = drsuapi_UpdateRefs(b_state, mem_ctx, &ureq);
if (!W_ERROR_IS_OK(werr)) {
DEBUG(0,(__location__ ": Failed UpdateRefs in DsGetNCChanges - %s\n",
diff --git a/source4/rpc_server/drsuapi/updaterefs.c b/source4/rpc_server/drsuapi/updaterefs.c
index d628388849..a089586d24 100644
--- a/source4/rpc_server/drsuapi/updaterefs.c
+++ b/source4/rpc_server/drsuapi/updaterefs.c
@@ -66,6 +66,8 @@ static WERROR uref_add_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(reps.r[reps.count]);
reps.r[reps.count].version = 1;
reps.r[reps.count].ctr.ctr1 = *dest;
+ /* add the GCSPN flag if the client asked for it */
+ reps.r[reps.count].ctr.ctr1.replica_flags |= (options & DRSUAPI_DRS_REF_GCSPN);
reps.count++;
werr = dsdb_savereps(sam_ctx, mem_ctx, dn, "repsTo", reps.r, reps.count);