summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-07 13:53:13 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-07 22:50:05 +0000
commitfc5fecb0b7d6bbbcf3613df302785176e4582b52 (patch)
treea3994b878b11dce8b8064655da99ffe162c665b0 /source4/scripting
parent18085b12360b5314730e0e82eee2204d44cb0939 (diff)
downloadsamba-fc5fecb0b7d6bbbcf3613df302785176e4582b52.tar.gz
samba-fc5fecb0b7d6bbbcf3613df302785176e4582b52.tar.bz2
samba-fc5fecb0b7d6bbbcf3613df302785176e4582b52.zip
s4-drs: allow override of the replica_flags
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/drs_utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/drs_utils.py b/source4/scripting/python/samba/drs_utils.py
index a600c2310b..95ccac5650 100644
--- a/source4/scripting/python/samba/drs_utils.py
+++ b/source4/scripting/python/samba/drs_utils.py
@@ -111,7 +111,8 @@ class drs_Replicate:
def replicate(self, dn, source_dsa_invocation_id, destination_dsa_guid,
- schema=False, exop=drsuapi.DRSUAPI_EXOP_NONE, rodc=False):
+ schema=False, exop=drsuapi.DRSUAPI_EXOP_NONE, rodc=False,
+ replica_flags=None):
'''replicate a single DN'''
# setup for a GetNCChanges call
@@ -126,7 +127,9 @@ class drs_Replicate:
req8.highwatermark.reserved_usn = 0
req8.highwatermark.highest_usn = 0
req8.uptodateness_vector = None
- if exop == drsuapi.DRSUAPI_EXOP_REPL_SECRET:
+ if replica_flags is not None:
+ req8.replica_flags = replica_flags
+ elif exop == drsuapi.DRSUAPI_EXOP_REPL_SECRET:
req8.replica_flags = 0
else:
req8.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
@@ -135,6 +138,8 @@ class drs_Replicate:
drsuapi.DRSUAPI_DRS_NEVER_SYNCED)
if rodc:
req8.replica_flags |= drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING
+ else:
+ req8.replica_flags |= drsuapi.DRSUAPI_DRS_WRIT_REP
req8.max_object_count = 402
req8.max_ndr_size = 402116
req8.extended_op = exop