1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-14 21:44:19 +03:00

join.py: Allow RODC to have push replication at join

Normally DsAddEntry connects to DRSUAPI, however not in the RODC case. This meant that
it never called DsReplicaUpdateRefs and so never got push-replication after join.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam
2017-03-28 14:29:26 +13:00
committed by Garming Sam
parent 94256c9606
commit 58113e5bc9

View File

@@ -964,8 +964,10 @@ class dc_join(object):
if not ctx.RODC:
r.options |= drsuapi.DRSUAPI_DRS_WRIT_REP
if ctx.drsuapi:
ctx.drsuapi.DsReplicaUpdateRefs(ctx.drsuapi_handle, 1, r)
if ctx.drsuapi is None:
ctx.drsuapi_connect()
ctx.drsuapi.DsReplicaUpdateRefs(ctx.drsuapi_handle, 1, r)
def join_finalise(ctx):
"""Finalise the join, mark us synchronised and setup secrets db."""