summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2019-07-24 15:18:40 +1200
committerKarolin Seeger <kseeger@samba.org>2019-08-07 10:57:33 +0000
commit8a09ea3c70f95a577ed42123ebe8d3ab26f2c39d (patch)
tree302fb963a3599d75081a947d83224e3fac2f3cb9 /python
parent816053b7bba894aa217a895925621801f0d17681 (diff)
downloadsamba-8a09ea3c70f95a577ed42123ebe8d3ab26f2c39d.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> (cherry picked from commit d90ccce59754bc833027c06683afac25f7a8d474)
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(),