From: Douglas Bagnall Date: Fri, 19 Oct 2018 04:15:30 +0000 (+1300) Subject: traffic: assign context domain at start X-Git-Tag: tdb-1.3.17~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65c02fd68c337779b2482f3bfc7138372eac2d70;p=thirdparty%2Fsamba.git traffic: assign context domain at start Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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))