msg_ctxs.append(self.msg_ctx)
self.msg_ctx.irpc_add_name(AUTH_EVENT_NAME)
+ # Now switch back to using the client-side smb.conf. The tests will
+ # use the first interface in the client.conf (we need to strip off
+ # the subnet mask portion)
+ lp_ctx = self.get_loadparm()
+ client_ip_and_mask = lp_ctx.get('interfaces')[0]
+ client_ip = client_ip_and_mask.split('/')[0]
+
+ # the messaging ctx is the server's view of the world, so our own
+ # client IP will be the remoteAddress when connections are logged
+ self.remoteAddress = client_ip
+
def messageHandler(context, msgType, src, message):
# This does not look like sub unit output and it
# makes these tests much easier to debug.
def setUp(self):
super(AuthLogPassChangeTests, self).setUp()
- self.remoteAddress = os.environ["CLIENT_IP"]
self.server_ip = os.environ["SERVER_IP"]
host = "ldap://%s" % os.environ["SERVER"]
planoldpythontestsuite("ad_dc_ntvfs:local", "samba.tests.auth_log", extra_args=['-U"$USERNAME%$PASSWORD"'],
environ={'CLIENT_IP': '127.0.0.11',
'SOCKET_WRAPPER_DEFAULT_IFACE': 11})
- planoldpythontestsuite("ad_dc", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11'})
- planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.auth_log_pass_change", extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11'})
+ planoldpythontestsuite("ad_dc", "samba.tests.auth_log_pass_change",
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
+ planoldpythontestsuite("ad_dc_ntvfs", "samba.tests.auth_log_pass_change",
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
# these tests use a NCA local RPC connection, so always run on the
# :local testenv, and so don't need to fake a client connection