]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: Allow drs replicate --local to create partitions
authorGarming Sam <garming@catalyst.net.nz>
Wed, 24 Jul 2019 03:18:40 +0000 (15:18 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 Jul 2019 02:50:24 +0000 (02:50 +0000)
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>
python/samba/netcmd/drs.py

index 739498cca1b4662be89802b2958f74120f96d0f6..9d6e8087e87a80ce4ebff3b568e66e5ac9c67b6c 100644 (file)
@@ -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(),