join: Add more framework for renaming a domain
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 11 Jun 2018 04:50:28 +0000 (16:50 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 5 Jul 2018 02:01:25 +0000 (04:01 +0200)
commit634a72df24e74bce07d2481fb86b0ce4b7ebaa38
treec931ee272fa04e08b3e01f4b485a67c2cf478150
parent734ea271ab01e74d0694f3fbc9acdf980d866b30
join: Add more framework for renaming a domain

Add a DCCloneContext subclass which will rename the DB objects as they
get cloned. This uses the drs_ReplicateRenamer class added to drs_utils
in an earlier patch. Where the drs_Replicate object currently gets
created has been split out into a simple new function, which we can then
override in the rename case.

The other important difference is overriding the provision step, so that
we use the new domain-DN/realm when setting up the initial SAM DB (and
smb.conf, secrets.ldb, etc).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/join.py