tests: Work out DOMSID via samdb rather than environs
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 22 Nov 2018 20:46:38 +0000 (09:46 +1300)
committerTim Beale <timbeale@samba.org>
Tue, 27 Nov 2018 02:43:17 +0000 (03:43 +0100)
commitcbcd8eec6ea7eb32d4860eefdec5009ff274e967
tree1b2d3fecf95307643c38892da3b0e4ae3cd5bab4
parent738418ea3ee669b1b917f4b8a6da1f69fa3558f1
tests: Work out DOMSID via samdb rather than environs

Not all testenvs have the DOMSID set as an environment variable.
However, it's easy enough to work out from querying the samdb.

This is a slight change in that we use a source4-generated loadparm
to connect to the DB (self.lp is source3-generated, presumably for
some SMB connection dependency).

This change is so we can run the ntacls_backup tests against a DC with
SMBv1 disabled (the restoredc). Note that currently the tests fail in
the smb.SMB() connection in the setUp(), so we can't run them as part
of autobuild just yet (because we can't known-fail test errors).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

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