summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2019-07-24 15:18:40 +1200
committerAndrew Bartlett <abartlet@samba.org>2019-07-31 02:50:24 +0000
commitd90ccce59754bc833027c06683afac25f7a8d474 (patch)
tree106d8880a8a73db3247edde9fb23fe0247228b14 /python
parent2b590e16bcb4f4e1f1f0bf049a863db38e634beb (diff)
downloadsamba-d90ccce59754bc833027c06683afac25f7a8d474.tar.gz
netcmd: Allow drs replicate --local to create partitions
Currently, neither the offline (--local) or online (normal replica sync) methods allow partition creation post-join. This overrides the Python default to not create the DB, which allows TDB + MDB to work. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14051 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/drs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index 739498cca1b..9d6e8087e87 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -449,8 +449,10 @@ class cmd_drs_replicate(Command):
self.server = SOURCE_DC
drsuapi_connect(self)
+ # Override the default flag LDB_FLG_DONT_CREATE_DB
self.local_samdb = SamDB(session_info=system_session(), url=None,
- credentials=self.creds, lp=self.lp)
+ credentials=self.creds, lp=self.lp,
+ flags=0)
self.samdb = SamDB(url="ldap://%s" % self.server,
session_info=system_session(),