diff options
author | Matthieu Patou <mat@matws.net> | 2011-10-25 20:13:00 +0200 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2011-12-19 11:49:18 +0100 |
commit | f6435b734ab50b623350b107d014095c49e48e20 (patch) | |
tree | fcb2f3c9d9f583d19b703536c46277984f7f80b8 /source4/scripting/python | |
parent | b64494535dc62f4073fc6302847593ed6e6ec38b (diff) | |
download | samba-f6435b734ab50b623350b107d014095c49e48e20.tar.gz samba-f6435b734ab50b623350b107d014095c49e48e20.tar.bz2 samba-f6435b734ab50b623350b107d014095c49e48e20.zip |
s4-join: replicate first with DRS_CRITICAL_ONLY and DRS_GET_ANC objects for the base dn partition
Windows dcpromo do the same: getncchanges with DRS_GET_ANC and
DRS_CRITICAL_ONLY, then it does a getncchanges without those flags for
the rest.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/join.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py index 3e3d2178c3..818e0cec6d 100644 --- a/source4/scripting/python/samba/join.py +++ b/source4/scripting/python/samba/join.py @@ -658,6 +658,16 @@ class dc_join(object): destination_dsa_guid, rodc=ctx.RODC, replica_flags=ctx.replica_flags) if not ctx.subdomain: + # Replicate first the critical object for the basedn + if not ctx.domain_replica_flags & drsuapi.DRSUAPI_DRS_CRITICAL_ONLY: + print "Replicating critical objects from the base DN of the domain" + ctx.domain_replica_flags |= drsuapi.DRSUAPI_DRS_CRITICAL_ONLY | drsuapi.DRSUAPI_DRS_GET_ANC + repl.replicate(ctx.base_dn, source_dsa_invocation_id, + destination_dsa_guid, rodc=ctx.RODC, + replica_flags=ctx.domain_replica_flags) + ctx.domain_replica_flags ^= drsuapi.DRSUAPI_DRS_CRITICAL_ONLY | drsuapi.DRSUAPI_DRS_GET_ANC + else: + ctx.domain_replica_flags |= drsuapi.DRSUAPI_DRS_GET_ANC repl.replicate(ctx.base_dn, source_dsa_invocation_id, destination_dsa_guid, rodc=ctx.RODC, replica_flags=ctx.domain_replica_flags) |