[SCM] Samba Shared Repository - branch v4-18-stable updated
Jule Anger
janger at samba.org
Wed Apr 19 10:22:40 UTC 2023
The branch, v4-18-stable has been updated
via 4f9b36a6156 VERSION: Disable GIT_SNAPSHOT for the 4.18.2 release.
via a87efafabf8 WHATSNEW: Add release notes for Samba 4.18.2.
via 10ec0699aed shadow_copy2: Fix stream open for streams_depot paths
via a377bd61102 tests: Show that streams_depot and shadow_copy2 don't play together
via e1508b92203 streams_depot: Create files when requested
via 64161923b6d rpcd_mdssvc: initialize POSIX locking
via 5cc3c1b5f6b net_ads: fill ads->auth.realm from c->creds
via 4f1d674aa92 testprogs/blackbox: add test_net_ads_search_server.sh
via 50d90531fae smbXsrv_tcon: avoid storing temporary (invalid!) records.
via 31d4b337cb7 smbd: Fix case normalization in for directories
via da3531910d7 tests: Show that the case sensitive large dir optimization is broken
via 9af15e1737f tests: Move libsmb-basic to fileserver_smb1 environment
via 188d598c1d8 s3: smbd: Fix log spam. Change a normal error message from DBG_ERR (level 0) to DBG_INFO (level 5).
via d477f6fa70a smbd: Prevent creation of vetoed files
via c3582deb5a0 CI: add a test creating a vetoed file
via dea4cb70045 dsdb/tests: Double number of expressions in large_ldap.py ldap_timeout test
via 330958ae804 dsdb/tests: Move SD modification on class-created objects to classSetUp
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.
via 4022ee96aef python:netcmd: Decode return value of find_netbios() from bytes into string
via 50f68094f68 dsdb: Avoid ERROR(ldb): uncaught exception - Deleted target CN=NTDS Settings... in join
via e804b5b7808 selftest/drs: Demonstrate ERROR(ldb): uncaught exception - Deleted target CN=NTDS Settings... in join
via 1a119c757df tsocket: Increase tcp_user_timeout max_loops
via f968514c4d4 idmap_hash: remember new domain sids in idmap_hash_sid_to_id()
via 750865aca3a idmap_hash: don't return ID_REQUIRE_TYPE if the domain is known in the netsamlogon cache
via eb4129d3cc7 idmap_hash: only return ID_REQUIRE_TYPE if we don't know about the domain yet
via e79be5ed069 idmap_hash: return ID_REQUIRE_TYPE only if there's a chance to get a mapping later
via da963496278 idmap_hash: split out a idmap_hash_sid_to_id() helper function
via 31cedf58e69 idmap_hash: split out a idmap_hash_id_to_sid() helper function
via 54e872cdf05 idmap_hash: mirror the NT_STATUS_NONE_MAPPED/STATUS_SOME_UNMAPPED logic from idmap_autorid
via 678c66f1327 idmap_hash: we don't need to call idmap_hash_initialize() over an over again
via bbd1f56b78c idmap_hash: remove unused error checks
via 00909630b0d idmap_hash: fix comments about the algorithm
via e804feaf76d idmap_hash: provide ID_TYPE_BOTH mappings also for unixids_to_sids
via fd7e0aaa196 idmap_autorid: fix ID_REQUIRE_TYPE for more than one SID for an unknown domain
via 5c68985b278 winbindd: don't call set_domain_online_request() in the idmap child
via 5db0223764d VERSION: Bump version up to Samba 4.18.2...
from 4b145ce26b6 VERSION: Disable GIT_SNAPSHOT for the 4.18.1 release.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-18-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 77 +++++-
lib/tsocket/tests/test_tstream.c | 2 +-
libcli/smb/smbXcli_base.c | 11 +
python/samba/join.py | 19 ++
python/samba/netcmd/ldapcmp.py | 2 +-
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/libsmb-basic.py | 24 +-
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 +-
selftest/target/Samba3.pm | 6 +
source3/modules/vfs_shadow_copy2.c | 25 +-
source3/modules/vfs_streams_depot.c | 2 +-
source3/rpc_server/rpcd_mdssvc.c | 8 +
source3/script/tests/test_veto_files.sh | 47 ++++
source3/script/tests/test_zero_readsize.sh | 101 +++++++
source3/selftest/tests.py | 12 +
source3/smbd/filename.c | 18 +-
source3/smbd/globals.h | 5 +
source3/smbd/open.c | 2 +-
source3/smbd/smb1_service.c | 48 ++--
source3/smbd/smb2_service.c | 15 -
source3/smbd/smb2_tcon.c | 58 ++--
source3/smbd/smbXsrv_tcon.c | 29 +-
source3/utils/net_ads.c | 10 +-
source3/winbindd/idmap_autorid.c | 15 +-
source3/winbindd/idmap_hash/idmap_hash.c | 302 +++++++++++++--------
source3/winbindd/winbindd_dual.c | 7 -
source4/dsdb/pydsdb.c | 2 +
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 13 +-
source4/dsdb/samdb/samdb.h | 2 +
source4/dsdb/tests/python/large_ldap.py | 20 +-
source4/dsdb/tests/python/urgent_replication.py | 20 +-
source4/selftest/tests.py | 16 +-
source4/torture/drs/python/ridalloc_exop.py | 135 +++++++++
.../torture/drs/python/samba_tool_drs_showrepl.py | 69 +++--
testprogs/blackbox/test_net_ads_search_server.sh | 37 +++
49 files changed, 1024 insertions(+), 361 deletions(-)
create mode 100755 source3/script/tests/test_zero_readsize.sh
create mode 100755 testprogs/blackbox/test_net_ads_search_server.sh
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index c976c5b630d..8ee63d62b28 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=18
-SAMBA_VERSION_RELEASE=1
+SAMBA_VERSION_RELEASE=2
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 1b49d1b5a6a..bfad04cbde0 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,77 @@
+ ==============================
+ Release Notes for Samba 4.18.2
+ April 19, 2023
+ ==============================
+
+
+This is the latest stable release of the Samba 4.18 release series.
+
+
+Changes since 4.18.1
+--------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 15302: Log flood: smbd_calculate_access_mask_fsp: Access denied:
+ message level should be lower.
+ * BUG 15306: Floating point exception (FPE) via cli_pull_send at
+ source3/libsmb/clireadwrite.c.
+
+o Andrew Bartlett <abartlet at samba.org>
+ * BUG 15328: test_tstream_more_tcp_user_timeout_spin fails intermittently on
+ Rackspace GitLab runners.
+ * BUG 15329: Reduce flapping of ridalloc test.
+ * BUG 15351: large_ldap test is unreliable.
+
+o Ralph Boehme <slow at samba.org>
+ * BUG 15143: New filename parser doesn't check veto files smb.conf parameter.
+ * BUG 15354: mdssvc may crash when initializing.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 15313: large directory optimization broken for non-lcomp path elements.
+ * BUG 15357: streams_depot fails to create streams.
+ * BUG 15358: shadow_copy2 and streams_depot don't play well together.
+
+o Rob van der Linde <rob at catalyst.net.nz>
+ * BUG 15316: Flapping tests in samba_tool_drs_show_repl.py.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 15317: winbindd idmap child contacts the domain controller without a
+ need.
+ * BUG 15318: idmap_autorid may fail to map sids of trusted domains for the
+ first time.
+ * BUG 15319: idmap_hash doesn't use ID_TYPE_BOTH for reverse mappings.
+ * BUG 15323: net ads search -P doesn't work against servers in other domains.
+ * BUG 15353: Temporary smbXsrv_tcon_global.tdb can't be parsed.
+
+o Joseph Sutton <josephsutton at catalyst.net.nz>
+ * BUG 15316: Flapping tests in samba_tool_drs_show_repl.py.
+ * BUG 15343: Tests use depricated and removed methods like
+ assertRegexpMatches.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical:matrix.org matrix room, or
+#samba-technical IRC channel on irc.libera.chat.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the Samba 4.1 and newer product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
==============================
Release Notes for Samba 4.18.1
March 29, 2023
@@ -65,8 +139,7 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
==============================
Release Notes for Samba 4.18.0
March 08, 2023
diff --git a/lib/tsocket/tests/test_tstream.c b/lib/tsocket/tests/test_tstream.c
index a920e671cda..47008bb8bf8 100644
--- a/lib/tsocket/tests/test_tstream.c
+++ b/lib/tsocket/tests/test_tstream.c
@@ -322,7 +322,7 @@ static void test_tstream_server_spin_client_tcp_user_timeout(struct socket_pair
rc = write(sp->socket_client, TEST_STRING, sizeof(TEST_STRING));
assert_return_code(rc, errno);
sp->expected_errno = ETIMEDOUT;
- sp->max_loops = 15;
+ sp->max_loops = 30;
}
static void test_tstream_server_spin_client_both_timer(struct tevent_context *ev,
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/join.py b/python/samba/join.py
index 70b3c9729b0..6c1ab3be7b4 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -50,6 +50,7 @@ import tempfile
from collections import OrderedDict
from samba.common import get_string
from samba.netcmd import CommandError
+from samba import dsdb
class DCJoinException(Exception):
@@ -937,6 +938,10 @@ class DCJoinContext(object):
"""Replicate the SAM."""
ctx.logger.info("Starting replication")
+
+ # A global transaction is started so that linked attributes
+ # are applied at the very end, once all partitions are
+ # replicated. This helps get all cross-partition links.
ctx.local_samdb.transaction_start()
try:
source_dsa_invocation_id = misc.GUID(ctx.samdb.get_invocation_id())
@@ -1057,7 +1062,21 @@ class DCJoinContext(object):
ctx.local_samdb.transaction_cancel()
raise
else:
+
+ # This is a special case, we have completed a full
+ # replication so if a link comes to us that points to a
+ # deleted object, and we asked for all objects already, we
+ # just have to ignore it, the chance to re-try the
+ # replication with GET_TGT has long gone. This can happen
+ # if the object is deleted and sent to us after the link
+ # was sent, as we are processing all links in the
+ # transaction_commit().
+ if not ctx.domain_replica_flags & drsuapi.DRSUAPI_DRS_CRITICAL_ONLY:
+ ctx.local_samdb.set_opaque_integer(dsdb.DSDB_FULL_JOIN_REPLICATION_COMPLETED_OPAQUE_NAME,
+ 1)
ctx.local_samdb.transaction_commit()
+ ctx.local_samdb.set_opaque_integer(dsdb.DSDB_FULL_JOIN_REPLICATION_COMPLETED_OPAQUE_NAME,
+ 0)
ctx.logger.info("Committed SAM database")
# A large replication may have caused our LDB connection to the
diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py
index fb49cbe1ae5..ff26e96332d 100644
--- a/python/samba/netcmd/ldapcmp.py
+++ b/python/samba/netcmd/ldapcmp.py
@@ -121,7 +121,7 @@ class LDAPBase(object):
for x in res:
if "nETBIOSName" in x:
- return x["nETBIOSName"][0]
+ return x["nETBIOSName"][0].decode()
def object_exists(self, object_dn):
res = None
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):
--
Samba Shared Repository
More information about the samba-cvs
mailing list