[SCM] Samba Shared Repository - branch v4-18-test updated
Jule Anger
janger at samba.org
Wed Apr 5 13:03:01 UTC 2023
The branch, v4-18-test has been updated
via 7e6dc45f7e6 selftest: fix flapping samba-tool drs showrepl test
via 5382bf6344c selftest: make two samba-tool drs tests generic
via e9f5d1c03bc python: Replace calls to deprecated methods
via e59e9eadd0e s3: libcli: Refuse to connect to any server with zero values for max_trans_size, max_read_size, max_write_size.
via 05fcd4f3035 tests: Add samba3.blackbox.zero_readsize test.
from 4022ee96aef python:netcmd: Decode return value of find_netbios() from bytes into string
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-test
- Log -----------------------------------------------------------------
commit 7e6dc45f7e61dfad2d56ff58f31664cefb96281c
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Thu Feb 23 16:56:30 2023 +1300
selftest: fix flapping samba-tool drs showrepl test
Test should have been using "schema_pair_dc", it was picking this up from the variable env in the loop above it.
However, it was hardcoded to use promoted_dc.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15316
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Joseph Sutton <josephsutton at catalyst.net.nz>
(cherry picked from commit 3687ab318a9553883d8c0d1214e2d49b83ec91ba)
Autobuild-User(v4-18-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-18-test): Wed Apr 5 13:02:59 UTC 2023 on atb-devel-224
commit 5382bf6344cc417144136957cc5e04f6f0aa1fcd
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Thu Feb 23 16:56:07 2023 +1300
selftest: make two samba-tool drs tests generic
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15316
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Joseph Sutton <josephsutton at catalyst.net.nz>
(cherry picked from commit 1368e359b2a75b6b683aff274b2b2084f3cd469b)
commit e9f5d1c03bcb800fc6e01a11c49cf5c193d6a00c
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date: Thu Jan 19 08:37:03 2023 +1300
python: Replace calls to deprecated methods
These aliases are deprecated and have been removed in Python 3.12.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15343
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15316
Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
(cherry picked from commit 41aa379abb391ffab77238d65ee5ba11b9ab8538)
[abartlet at samba.org BUG tag added as required patch for bug 15316]
commit e59e9eadd0e86126c56107be08c2f5b25c6bc484
Author: Jeremy Allison <jra at samba.org>
Date: Tue Mar 21 10:34:46 2023 -0700
s3: libcli: Refuse to connect to any server with zero values for max_trans_size, max_read_size, max_write_size.
There's nothing we can do to such a server (this
now matches the behavior for SMB1).
Remove knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15306
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Wed Mar 29 18:58:33 UTC 2023 on atb-devel-224
(cherry picked from commit 76573d6d8f168d6e6107af26a434b8c71aaf93af)
commit 05fcd4f3035442df1e7fc2db0c4d4e74f6f36050
Author: Jeremy Allison <jra at samba.org>
Date: Tue Mar 21 10:31:36 2023 -0700
tests: Add samba3.blackbox.zero_readsize test.
smbclient crashes when smbd has "smb2 max read = 0"
in the [global] section of smb.conf.
We should fail the protocol negotiation with
NT_STATUS_INVALID_NETWORK_RESPONSE in this case.
Adds knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15306
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 006fe806782c42e860ed2cf2bc9f6b1b82c3a307)
-----------------------------------------------------------------------
Summary of changes:
libcli/smb/smbXcli_base.c | 11 +++
python/samba/tests/audit_log_dsdb.py | 40 ++++----
python/samba/tests/audit_log_pass_change.py | 28 +++---
python/samba/tests/gpo.py | 16 ++--
python/samba/tests/group_audit.py | 48 +++++-----
python/samba/tests/prefork_restart.py | 18 ++--
python/samba/tests/samba_tool/computer.py | 6 +-
python/samba/tests/samba_tool/contact.py | 6 +-
.../samba_tool/drs_clone_dc_data_lmdb_size.py | 10 +-
python/samba/tests/samba_tool/join_lmdb_size.py | 10 +-
python/samba/tests/samba_tool/ou.py | 6 +-
python/samba/tests/samba_tool/passwordsettings.py | 4 +-
.../samba/tests/samba_tool/promote_dc_lmdb_size.py | 10 +-
.../samba/tests/samba_tool/provision_lmdb_size.py | 10 +-
.../tests/samba_tool/provision_password_check.py | 4 +-
python/samba/tests/upgradeprovisionneeddc.py | 8 +-
source3/script/tests/test_zero_readsize.sh | 101 +++++++++++++++++++++
source3/selftest/tests.py | 12 +++
source4/dsdb/tests/python/urgent_replication.py | 20 ++--
source4/selftest/tests.py | 3 +-
.../torture/drs/python/samba_tool_drs_showrepl.py | 69 ++++++++------
21 files changed, 289 insertions(+), 151 deletions(-)
create mode 100755 source3/script/tests/test_zero_readsize.sh
Changeset truncated at 500 lines:
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index aaf2d405a94..a2a551d0f79 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -5128,6 +5128,17 @@ static void smbXcli_negprot_smb2_done(struct tevent_req *subreq)
conn->smb2.server.system_time = BVAL(body, 40);
conn->smb2.server.start_time = BVAL(body, 48);
+ if (conn->smb2.server.max_trans_size == 0 ||
+ conn->smb2.server.max_read_size == 0 ||
+ conn->smb2.server.max_write_size == 0) {
+ /*
+ * We can't connect to servers we can't
+ * do any operations on.
+ */
+ tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
+ return;
+ }
+
security_offset = SVAL(body, 56);
security_length = SVAL(body, 58);
diff --git a/python/samba/tests/audit_log_dsdb.py b/python/samba/tests/audit_log_dsdb.py
index 33884bf5407..82535dcaf2d 100644
--- a/python/samba/tests/audit_log_dsdb.py
+++ b/python/samba/tests/audit_log_dsdb.py
@@ -144,8 +144,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Modify", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
# We skip the check for self.get_service_description() as this
@@ -185,8 +185,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Modify", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
# We skip the check for self.get_service_description() as this
@@ -227,8 +227,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Modify", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -266,8 +266,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Modify", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -297,8 +297,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Add", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
@@ -343,8 +343,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Delete", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
self.assertEqual(0, audit["statusCode"])
self.assertEqual("Success", audit["status"])
@@ -383,8 +383,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Delete", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertEqual(ERR_NO_SUCH_OBJECT, audit["statusCode"])
self.assertEqual("No such object", audit["status"])
self.assertTrue(self.is_guid(audit["sessionId"]))
@@ -431,8 +431,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Add", audit["operation"])
self.assertTrue(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -480,8 +480,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Delete", audit["operation"])
self.assertTrue(audit["performedAsSystem"])
self.assertTrue(dn.lower(), audit["dn"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -514,8 +514,8 @@ class AuditLogDsdbTests(AuditLogTestBase):
self.assertEqual("Modify", audit["operation"])
self.assertFalse(audit["performedAsSystem"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
diff --git a/python/samba/tests/audit_log_pass_change.py b/python/samba/tests/audit_log_pass_change.py
index 7c3e622de99..f7229a670d7 100644
--- a/python/samba/tests/audit_log_pass_change.py
+++ b/python/samba/tests/audit_log_pass_change.py
@@ -125,8 +125,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_CHANGE, audit["eventId"])
self.assertEqual("Change", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
@@ -154,8 +154,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_RESET, audit["eventId"])
self.assertEqual("Reset", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
@@ -195,8 +195,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_RESET, audit["eventId"])
self.assertEqual("Reset", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
@@ -232,8 +232,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_RESET, audit["eventId"])
self.assertEqual("Reset", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
@@ -266,8 +266,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_CHANGE, audit["eventId"])
self.assertEqual("Change", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -297,8 +297,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_RESET, audit["eventId"])
self.assertEqual("Reset", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -324,8 +324,8 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.assertEqual(EVT_ID_PASSWORD_RESET, audit["eventId"])
self.assertEqual("Reset", audit["action"])
self.assertEqual(dn, audit["dn"])
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
service_description = self.get_service_description()
diff --git a/python/samba/tests/gpo.py b/python/samba/tests/gpo.py
index 91a97e05898..b9ded20c828 100644
--- a/python/samba/tests/gpo.py
+++ b/python/samba/tests/gpo.py
@@ -6341,8 +6341,8 @@ class GPOTests(tests.TestCase):
gp_db = store.get_gplog(machine_creds.get_username())
del_gpos = get_deleted_gpos_list(gp_db, [])
ext.process_group_policy(del_gpos, [], f.name)
- self.assertNotEquals(open(f.name, 'r').read(), text.text,
- 'The motd was not unapplied')
+ self.assertNotEqual(open(f.name, 'r').read(), text.text,
+ 'The motd was not unapplied')
# Unstage the Registry.pol file
unstage_file(manifest)
@@ -6394,8 +6394,8 @@ class GPOTests(tests.TestCase):
gp_db = store.get_gplog(machine_creds.get_username())
del_gpos = get_deleted_gpos_list(gp_db, [])
ext.process_group_policy(del_gpos, [], f.name)
- self.assertNotEquals(open(f.name, 'r').read(), text.text,
- 'The issue was not unapplied')
+ self.assertNotEqual(open(f.name, 'r').read(), text.text,
+ 'The issue was not unapplied')
# Unstage the manifest.xml file
unstage_file(manifest)
@@ -7066,16 +7066,16 @@ class GPOTests(tests.TestCase):
'Number of Chromium policies is incorrect')
omanaged_file = managed_file
managed_file = os.path.join(managed, managed_files[0])
- self.assertNotEquals(omanaged_file, managed_file,
- 'The managed Chromium file did not change')
+ self.assertNotEqual(omanaged_file, managed_file,
+ 'The managed Chromium file did not change')
recommended_files = os.listdir(recommended)
self.assertEquals(len(recommended_files), 1,
'Number of Chromium policies is incorrect')
orecommended_file = recommended_file
recommended_file = os.path.join(recommended, recommended_files[0])
- self.assertNotEquals(orecommended_file, recommended_file,
- 'The recommended Chromium file did not change')
+ self.assertNotEqual(orecommended_file, recommended_file,
+ 'The recommended Chromium file did not change')
# Verify RSOP does not fail
ext.rsop([g for g in gpos if g.name == guid][0])
diff --git a/python/samba/tests/group_audit.py b/python/samba/tests/group_audit.py
index a032a8ecd70..12efef2c046 100644
--- a/python/samba/tests/group_audit.py
+++ b/python/samba/tests/group_audit.py
@@ -113,8 +113,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=domain users,cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -129,8 +129,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=domain users,cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -154,8 +154,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -180,8 +180,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_02 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -208,8 +208,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -234,8 +234,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -261,8 +261,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=domain users,cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -277,8 +277,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=domain users,cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -304,8 +304,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -352,8 +352,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -369,8 +369,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=domain users,cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
@@ -386,8 +386,8 @@ class GroupAuditTests(AuditLogTestBase):
group_dn = "cn=" + GROUP_NAME_01 + ",cn=users," + self.base_dn
self.assertTrue(user_dn.lower(), audit["user"].lower())
self.assertTrue(group_dn.lower(), audit["group"].lower())
- self.assertRegexpMatches(audit["remoteAddress"],
- self.remoteAddress)
+ self.assertRegex(audit["remoteAddress"],
+ self.remoteAddress)
self.assertTrue(self.is_guid(audit["sessionId"]))
session_id = self.get_session()
self.assertEqual(session_id, audit["sessionId"])
diff --git a/python/samba/tests/prefork_restart.py b/python/samba/tests/prefork_restart.py
index 7d762196b58..9e35bd68a17 100644
--- a/python/samba/tests/prefork_restart.py
+++ b/python/samba/tests/prefork_restart.py
@@ -190,12 +190,12 @@ class PreforkProcessRestartTests(TestCase):
self.assertIsNotNone(new_pid)
# check that the pid has changed
- self.assertNotEquals(pid, new_pid)
+ self.assertNotEqual(pid, new_pid)
# check that the worker processes have restarted
new_workers = self.get_worker_pids("ldap", NUM_WORKERS)
for x in range(NUM_WORKERS):
- self.assertNotEquals(workers[x], new_workers[x])
+ self.assertNotEqual(workers[x], new_workers[x])
# check that the previous server entries have been removed.
self.check_for_duplicate_processes()
@@ -230,7 +230,7 @@ class PreforkProcessRestartTests(TestCase):
# check that the worker processes have restarted
new_workers = self.get_worker_pids("ldap", NUM_WORKERS)
# process 0 should have a new pid the others should be unchanged
- self.assertNotEquals(workers[0], new_workers[0])
+ self.assertNotEqual(workers[0], new_workers[0])
self.assertEqual(workers[1], new_workers[1])
self.assertEqual(workers[2], new_workers[2])
self.assertEqual(workers[3], new_workers[3])
@@ -273,7 +273,7 @@ class PreforkProcessRestartTests(TestCase):
# check that the worker processes have restarted
new_workers = self.get_worker_pids("ldap", NUM_WORKERS)
for x in range(NUM_WORKERS):
- self.assertNotEquals(workers[x], new_workers[x])
+ self.assertNotEqual(workers[x], new_workers[x])
# check that the previous server entries have been removed.
self.check_for_duplicate_processes()
@@ -306,12 +306,12 @@ class PreforkProcessRestartTests(TestCase):
self.assertIsNotNone(new_pid)
# check that the pid has changed
- self.assertNotEquals(pid, new_pid)
+ self.assertNotEqual(pid, new_pid)
# check that the worker processes have restarted
new_workers = self.get_worker_pids("rpc", NUM_WORKERS)
for x in range(NUM_WORKERS):
- self.assertNotEquals(workers[x], new_workers[x])
+ self.assertNotEqual(workers[x], new_workers[x])
# check that the previous server entries have been removed.
self.check_for_duplicate_processes()
@@ -347,7 +347,7 @@ class PreforkProcessRestartTests(TestCase):
# check that the worker processes have restarted
new_workers = self.get_worker_pids("rpc", NUM_WORKERS)
# process 0 should have a new pid the others should be unchanged
- self.assertNotEquals(workers[0], new_workers[0])
+ self.assertNotEqual(workers[0], new_workers[0])
self.assertEqual(workers[1], new_workers[1])
self.assertEqual(workers[2], new_workers[2])
self.assertEqual(workers[3], new_workers[3])
@@ -390,7 +390,7 @@ class PreforkProcessRestartTests(TestCase):
# check that the worker processes have restarted
new_workers = self.get_worker_pids("rpc", NUM_WORKERS)
for x in range(NUM_WORKERS):
- self.assertNotEquals(workers[x], new_workers[x])
+ self.assertNotEqual(workers[x], new_workers[x])
# check that the previous server entries have been removed.
self.check_for_duplicate_processes()
@@ -434,7 +434,7 @@ class PreforkProcessRestartTests(TestCase):
# check that the worker processes have restarted
new_workers = self.get_worker_pids("echo", NUM_WORKERS)
for x in range(NUM_WORKERS):
- self.assertNotEquals(workers[x], new_workers[x])
+ self.assertNotEqual(workers[x], new_workers[x])
# check that the previous server entries have been removed.
self.check_for_duplicate_processes()
diff --git a/python/samba/tests/samba_tool/computer.py b/python/samba/tests/samba_tool/computer.py
index a1f29993d01..231f369c52b 100644
--- a/python/samba/tests/samba_tool/computer.py
+++ b/python/samba/tests/samba_tool/computer.py
@@ -253,9 +253,9 @@ class ComputerCmdTestCase(SambaToolCmdTest):
self.assertIn('Moved computer "%s"' % computer["name"], out)
found = self._find_computer(computer["name"])
- self.assertNotEquals(found.get("dn"), olddn,
- ("Moved computer '%s' still exists with the "
- "same dn" % computer["name"]))
+ self.assertNotEqual(found.get("dn"), olddn,
+ ("Moved computer '%s' still exists with the "
+ "same dn" % computer["name"]))
computername = computer["name"].rstrip('$')
newexpecteddn = ldb.Dn(self.samdb,
"CN=%s,OU=%s,%s" %
diff --git a/python/samba/tests/samba_tool/contact.py b/python/samba/tests/samba_tool/contact.py
index 65f1a6857c9..b499a38f812 100644
--- a/python/samba/tests/samba_tool/contact.py
+++ b/python/samba/tests/samba_tool/contact.py
--
Samba Shared Repository
More information about the samba-cvs
mailing list