diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-06-25 16:12:47 +1200 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2019-07-02 02:23:09 +0000 |
commit | b281fc624e53ead0ef614ea2fcff46bc9b599f92 (patch) | |
tree | 5c95ec4a24af05861988c9cd0909d548f2827b62 /python | |
parent | 5cbe76e395de1c21246e1ecdaf9eeb57783a34f9 (diff) | |
download | samba-b281fc624e53ead0ef614ea2fcff46bc9b599f92.tar.gz |
provision: If --targetdir has been specified then we must always reset posix:eadb and xattr_tdb:file
This is required because otherwise this may have been set previously by another
part of selftest thanks to the global loadparm and the running of multiple
samba-tool tests within the same python process.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/provision/__init__.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index d78222845ba..ffca9f2aab5 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -774,18 +774,24 @@ def make_smbconf(smbconf, hostname, domain, realm, targetdir, lp.set("binddns dir", global_settings["binddns dir"]) if eadb: - if use_ntvfs and not lp.get("posix:eadb"): + if use_ntvfs: if targetdir is not None: privdir = os.path.join(targetdir, "private") - else: + lp.set("posix:eadb", + os.path.abspath(os.path.join(privdir, "eadb.tdb"))) + elif not lp.get("posix:eadb"): privdir = lp.get("private dir") - lp.set("posix:eadb", os.path.abspath(os.path.join(privdir, "eadb.tdb"))) - elif not use_ntvfs and not lp.get("xattr_tdb:file"): + lp.set("posix:eadb", + os.path.abspath(os.path.join(privdir, "eadb.tdb"))) + else: if targetdir is not None: statedir = os.path.join(targetdir, "state") - else: + lp.set("xattr_tdb:file", + os.path.abspath(os.path.join(statedir, "xattr.tdb"))) + elif not lp.get("xattr_tdb:file"): statedir = lp.get("state directory") - lp.set("xattr_tdb:file", os.path.abspath(os.path.join(statedir, "xattr.tdb"))) + lp.set("xattr_tdb:file", + os.path.abspath(os.path.join(statedir, "xattr.tdb"))) shares = {} if serverrole == "active directory domain controller": |