summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/drs_utils.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-05 14:08:49 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-05 23:42:08 +1100
commit278778c927b71847e87ce9b43e2a70665906befe (patch)
tree5825799545b12b190ab7c8d320ea0974c1e5817d /source4/scripting/python/samba/drs_utils.py
parentcbded38ed5f319af4e9836039bfa16c6123e2ba7 (diff)
downloadsamba-278778c927b71847e87ce9b43e2a70665906befe.tar.gz
samba-278778c927b71847e87ce9b43e2a70665906befe.tar.bz2
samba-278778c927b71847e87ce9b43e2a70665906befe.zip
s4-pydrs: added rodc option to python drs replication
Diffstat (limited to 'source4/scripting/python/samba/drs_utils.py')
-rw-r--r--source4/scripting/python/samba/drs_utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/drs_utils.py b/source4/scripting/python/samba/drs_utils.py
index 4686259df67..a600c2310b7 100644
--- a/source4/scripting/python/samba/drs_utils.py
+++ b/source4/scripting/python/samba/drs_utils.py
@@ -111,7 +111,7 @@ class drs_Replicate:
def replicate(self, dn, source_dsa_invocation_id, destination_dsa_guid,
- schema=False, exop=drsuapi.DRSUAPI_EXOP_NONE):
+ schema=False, exop=drsuapi.DRSUAPI_EXOP_NONE, rodc=False):
'''replicate a single DN'''
# setup for a GetNCChanges call
@@ -132,8 +132,9 @@ class drs_Replicate:
req8.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
drsuapi.DRSUAPI_DRS_PER_SYNC |
drsuapi.DRSUAPI_DRS_GET_ANC |
- drsuapi.DRSUAPI_DRS_NEVER_SYNCED |
- drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)
+ drsuapi.DRSUAPI_DRS_NEVER_SYNCED)
+ if rodc:
+ req8.replica_flags |= drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING
req8.max_object_count = 402
req8.max_ndr_size = 402116
req8.extended_op = exop
@@ -143,7 +144,7 @@ class drs_Replicate:
req8.mapping_ctr.num_mappings = 0
req8.mapping_ctr.mappings = None
- if not schema:
+ if not schema and rodc:
req8.partial_attribute_set = self.drs_get_rodc_partial_attribute_set()
while True: