summaryrefslogtreecommitdiff
path: root/python/samba/emulate
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-10-19 17:15:30 +1300
committerDouglas Bagnall <dbagnall@samba.org>2019-01-08 23:55:33 +0100
commit65c02fd68c337779b2482f3bfc7138372eac2d70 (patch)
treebc551af7ec726cff7dba48fb07f8c6da5ec4ff3b /python/samba/emulate
parent17579dd81052813cde2ed3aad0738540d417e60b (diff)
downloadsamba-65c02fd68c337779b2482f3bfc7138372eac2d70.tar.gz
traffic: assign context domain at start
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/emulate')
-rw-r--r--python/samba/emulate/traffic.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py
index 1d4316586e6..dadc6c140b7 100644
--- a/python/samba/emulate/traffic.py
+++ b/python/samba/emulate/traffic.py
@@ -359,9 +359,8 @@ class ReplayContext(object):
statsdir=None,
ou=None,
base_dn=None,
- domain=None,
+ domain=os.environ.get("DOMAIN"),
domain_sid=None):
-
self.server = server
self.netlogon_connection = None
self.creds = creds
@@ -459,11 +458,6 @@ class ReplayContext(object):
self.lp.set("state directory", self.tempdir)
self.lp.set("tls verify peer", "no_check")
- # If the domain was not specified, check for the environment
- # variable.
- if self.domain is None:
- self.domain = os.environ["DOMAIN"]
-
self.remoteAddress = "/root/ncalrpc_as_system"
self.samlogon_dn = ("cn=%s,%s" %
(self.netbios_name, self.ou))