self.msg_ctx = Messaging((1,), lp_ctx=lp_ctx)
self.msg_ctx.irpc_add_name(self.event_type)
+ # 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
+
#
# Check the remote address of a message against the one beimg used
# for the tests.
self.event_type = DSDB_EVENT_NAME
super(AuditLogDsdbTests, self).setUp()
- self.remoteAddress = os.environ["CLIENT_IP"]
self.server_ip = os.environ["SERVER_IP"]
host = "ldap://%s" % os.environ["SERVER"]
self.event_type = DSDB_PWD_EVENT_NAME
super(AuditLogPassChangeTests, self).setUp()
- self.remoteAddress = os.environ["CLIENT_IP"]
self.server_ip = os.environ["SERVER_IP"]
host = "ldap://%s" % os.environ["SERVER"]
self.event_type = DSDB_GROUP_EVENT_NAME
super(GroupAuditTests, self).setUp()
- self.remoteAddress = os.environ["CLIENT_IP"]
self.server_ip = os.environ["SERVER_IP"]
host = "ldap://%s" % os.environ["SERVER"]
"samba.tests.auth_log_winbind",
extra_args=['-U"$DC_USERNAME%$DC_PASSWORD"'])
planoldpythontestsuite("ad_dc", "samba.tests.audit_log_pass_change",
- extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11'})
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
planoldpythontestsuite("ad_dc", "samba.tests.audit_log_dsdb",
- extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11'})
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
planoldpythontestsuite("ad_dc", "samba.tests.group_audit",
- extra_args=['-U"$USERNAME%$PASSWORD"'],
- environ={'CLIENT_IP': '127.0.0.11'})
+ extra_args=['-U"$USERNAME%$PASSWORD"'])
planoldpythontestsuite("fl2008r2dc:local",
"samba.tests.getdcname",