[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Thu Nov 30 02:04:01 UTC 2023
The branch, master has been updated
via af53df6cd6e python/samba/tests: Fix incorrect super-class in cred_opt.py setUp()
via 0f2ff51a4b4 python/samba/tests: Fix incorrect superclass in test_min_domain_uid.py
via 42e78285632 python: Correct Python2 super() calls that called the wrong class
via 6ac48336780 python: tests: update all super calls to python 3 style in tests
via e8fda61a57f python: get rid of pointless empty overridden methods
via 983f222e382 python: Use constants from hresult.h for python constants
via b14ead30da3 python: move HRES_SEC_* constants to samba module
via 1a45e49b5f6 python: tests: make HRES_SEC_E_* constant an int
via 6bcfcacd536 python: PEP275: docstrings should always use double quotes
via 35d71bfc6f5 python: fix missing colon around param in docstring
from 72c6f38e9fe lib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test vectors
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit af53df6cd6e21f7394bb4b638e398588c8495127
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Nov 30 13:31:33 2023 +1300
python/samba/tests: Fix incorrect super-class in cred_opt.py setUp()
This will allow TEST_DEBUG_LEVEL to work in this test.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Thu Nov 30 02:03:05 UTC 2023 on atb-devel-224
commit 0f2ff51a4b4884ada7335cba73dc516e8475f356
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Nov 30 13:28:56 2023 +1300
python/samba/tests: Fix incorrect superclass in test_min_domain_uid.py
This was not intentional as far as can be determined.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 42e7828563220f7c7f281f68c3cdcd529e6f6ef8
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Nov 30 13:22:18 2023 +1300
python: Correct Python2 super() calls that called the wrong class
These changes have been checked as safe as skipping a superclass
has no actual impact.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 6ac48336780813cd5cb0cd9e5b5f1355aa342096
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Tue Nov 28 16:38:22 2023 +1300
python: tests: update all super calls to python 3 style in tests
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
[abartlet at samba.org Some python2 style super() calls remain due
to being an actual, even if reasonable, behaviour change]
commit e8fda61a57fbec996aa05eff8e696057237c7be0
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Tue Nov 28 15:59:41 2023 +1300
python: get rid of pointless empty overridden methods
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 983f222e382dfd2cf9df202f0645bdb1ec8a62ed
Author: Andrew Bartlett <abartlet at samba.org>
Date: Thu Nov 30 10:37:13 2023 +1300
python: Use constants from hresult.h for python constants
This encourages us to keep a single source for constants.
In the future this should be a generated python file like for ntstatus.
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit b14ead30da3fa6a12412ce97724daebb3cc3ebfa
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Tue Nov 28 15:13:21 2023 +1300
python: move HRES_SEC_* constants to samba module
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 1a45e49b5f6286f8a5071536e5a780322b7e1e9c
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Wed Nov 29 16:00:13 2023 +1300
python: tests: make HRES_SEC_E_* constant an int
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 6bcfcacd536f8fb82aacd533f39b74e663bd343d
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Tue Nov 28 15:11:12 2023 +1300
python: PEP275: docstrings should always use double quotes
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
commit 35d71bfc6f5cf379ac64a289bf97a6e4ddac1d20
Author: Rob van der Linde <rob at catalyst.net.nz>
Date: Tue Nov 28 15:02:00 2023 +1300
python: fix missing colon around param in docstring
Signed-off-by: Rob van der Linde <rob at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
-----------------------------------------------------------------------
Summary of changes:
python/pyglue.c | 5 ++
python/samba/__init__.py | 5 +-
python/samba/tests/__init__.py | 6 +-
python/samba/tests/audit_log_base.py | 2 +-
python/samba/tests/audit_log_dsdb.py | 4 +-
python/samba/tests/audit_log_pass_change.py | 5 +-
python/samba/tests/auth.py | 4 +-
python/samba/tests/auth_log.py | 5 +-
python/samba/tests/auth_log_base.py | 2 +-
python/samba/tests/auth_log_ncalrpc.py | 5 +-
python/samba/tests/auth_log_netlogon.py | 4 +-
python/samba/tests/auth_log_netlogon_bad_creds.py | 4 +-
python/samba/tests/auth_log_pass_change.py | 5 +-
python/samba/tests/auth_log_samlogon.py | 4 +-
python/samba/tests/auth_log_winbind.py | 4 +-
python/samba/tests/blackbox/bug13653.py | 4 +-
python/samba/tests/blackbox/downgradedatabase.py | 4 +-
python/samba/tests/blackbox/mdsearch.py | 4 +-
python/samba/tests/blackbox/netads_dns.py | 2 +-
python/samba/tests/blackbox/netads_json.py | 3 -
python/samba/tests/blackbox/samba_dnsupdate.py | 2 +-
python/samba/tests/blackbox/smbcacls.py | 2 +-
python/samba/tests/blackbox/smbcacls_basic.py | 3 -
.../blackbox/smbcacls_dfs_propagate_inherit.py | 3 -
.../blackbox/smbcacls_propagate_inhertance.py | 4 +-
.../samba/tests/blackbox/smbcacls_save_restore.py | 4 +-
python/samba/tests/blackbox/smbcontrol.py | 2 +-
python/samba/tests/blackbox/smbcontrol_process.py | 2 +-
python/samba/tests/complex_expressions.py | 2 +-
python/samba/tests/cred_opt.py | 8 +-
python/samba/tests/credentials.py | 2 +-
python/samba/tests/dcerpc/array.py | 4 +-
python/samba/tests/dcerpc/binding.py | 2 -
python/samba/tests/dcerpc/createtrustrelax.py | 2 -
python/samba/tests/dcerpc/dnsserver.py | 4 +-
python/samba/tests/dcerpc/mdssvc.py | 4 +-
python/samba/tests/dcerpc/raw_protocol.py | 2 +-
python/samba/tests/dcerpc/raw_testcase.py | 4 +-
python/samba/tests/dcerpc/registry.py | 2 +-
python/samba/tests/dcerpc/rpc_talloc.py | 6 +-
python/samba/tests/dcerpc/rpcecho.py | 2 +-
python/samba/tests/dcerpc/sam.py | 2 +-
python/samba/tests/dcerpc/samr_change_password.py | 4 +-
python/samba/tests/dcerpc/srvsvc.py | 2 +-
python/samba/tests/dcerpc/string_tests.py | 4 +-
python/samba/tests/dcerpc/testrpc.py | 4 +-
python/samba/tests/dcerpc/unix.py | 2 +-
python/samba/tests/dckeytab.py | 4 +-
python/samba/tests/dns.py | 17 ++--
python/samba/tests/dns_base.py | 8 +-
python/samba/tests/dns_forwarder.py | 6 +-
python/samba/tests/dns_forwarder_helpers/server.py | 2 +-
python/samba/tests/dns_invalid.py | 2 +-
python/samba/tests/dns_tkey.py | 2 +-
python/samba/tests/dns_wildcard.py | 2 +-
python/samba/tests/docs.py | 4 +-
python/samba/tests/domain_backup.py | 10 +--
python/samba/tests/dsdb.py | 2 +-
python/samba/tests/dsdb_schema_attributes.py | 5 +-
python/samba/tests/emulate/traffic_packet.py | 4 +-
python/samba/tests/encrypted_secrets.py | 2 +-
python/samba/tests/gensec.py | 2 +-
python/samba/tests/glue.py | 3 -
python/samba/tests/gpo.py | 5 +-
python/samba/tests/gpo_member.py | 5 +-
python/samba/tests/graph.py | 2 +-
python/samba/tests/group_audit.py | 4 +-
python/samba/tests/join.py | 4 +-
python/samba/tests/kcc/__init__.py | 2 +-
python/samba/tests/kcc/graph_utils.py | 2 +-
python/samba/tests/kcc/ldif_import_export.py | 4 +-
.../samba/tests/krb5/as_canonicalization_tests.py | 2 +-
python/samba/tests/krb5/as_req_tests.py | 2 +-
python/samba/tests/krb5/authn_policy_tests.py | 4 +-
python/samba/tests/krb5/kdc_base_test.py | 36 ++++-----
python/samba/tests/krb5/kdc_tests.py | 2 +-
python/samba/tests/krb5/kdc_tgs_tests.py | 8 +-
.../krb5/ms_kile_client_principal_lookup_tests.py | 52 ++++++------
python/samba/tests/krb5/protected_users_tests.py | 4 +-
python/samba/tests/krb5/raw_testcase.py | 2 +-
python/samba/tests/krb5/s4u_tests.py | 2 +-
python/samba/tests/krb5/simple_tests.py | 2 +-
python/samba/tests/krb5/test_min_domain_uid.py | 4 +-
python/samba/tests/krb5/xrealm_tests.py | 2 +-
python/samba/tests/krb5_credentials.py | 4 +-
python/samba/tests/ldap_raw.py | 92 +++++++++++-----------
python/samba/tests/ldap_referrals.py | 3 -
python/samba/tests/net_join.py | 5 +-
python/samba/tests/net_join_no_spnego.py | 5 +-
python/samba/tests/netbios.py | 5 +-
python/samba/tests/netlogonsvc.py | 5 +-
python/samba/tests/ntacls.py | 4 +-
python/samba/tests/ntacls_backup.py | 4 +-
python/samba/tests/ntlm_auth.py | 2 +-
python/samba/tests/ntlm_auth_base.py | 2 +-
python/samba/tests/ntlm_auth_krb5.py | 2 +-
python/samba/tests/ntlmdisabled.py | 5 +-
python/samba/tests/param.py | 4 +-
python/samba/tests/password_hash.py | 2 +-
python/samba/tests/password_hash_fl2003.py | 3 -
python/samba/tests/password_hash_fl2008.py | 3 -
python/samba/tests/password_hash_gpgme.py | 3 -
python/samba/tests/password_hash_ldap.py | 3 -
python/samba/tests/posixacl.py | 4 +-
python/samba/tests/prefork_restart.py | 5 +-
python/samba/tests/process_limits.py | 6 --
python/samba/tests/py_credentials.py | 4 +-
python/samba/tests/registry.py | 4 +-
python/samba/tests/s3_net_join.py | 5 +-
python/samba/tests/s3idmapdb.py | 4 +-
python/samba/tests/s3param.py | 4 +-
python/samba/tests/s3passdb.py | 4 +-
python/samba/tests/s3registry.py | 4 +-
python/samba/tests/s3windb.py | 4 +-
python/samba/tests/samba3sam.py | 8 +-
python/samba/tests/samba_tool/computer.py | 4 +-
python/samba/tests/samba_tool/contact.py | 4 +-
python/samba/tests/samba_tool/demote.py | 2 +-
python/samba/tests/samba_tool/dnscmd.py | 2 +-
.../samba_tool/drs_clone_dc_data_lmdb_size.py | 4 +-
python/samba/tests/samba_tool/dsacl.py | 4 +-
python/samba/tests/samba_tool/forest.py | 4 +-
python/samba/tests/samba_tool/gpo.py | 4 +-
python/samba/tests/samba_tool/gpo_exts.py | 4 +-
python/samba/tests/samba_tool/group.py | 8 +-
python/samba/tests/samba_tool/join_lmdb_size.py | 4 +-
python/samba/tests/samba_tool/ou.py | 4 +-
python/samba/tests/samba_tool/passwordsettings.py | 4 +-
.../samba/tests/samba_tool/promote_dc_lmdb_size.py | 4 +-
.../samba/tests/samba_tool/provision_lmdb_size.py | 4 +-
.../tests/samba_tool/provision_password_check.py | 4 +-
.../samba_tool/provision_userPassword_crypt.py | 4 +-
python/samba/tests/samba_tool/rodc.py | 4 +-
python/samba/tests/samba_tool/schema.py | 5 +-
python/samba/tests/samba_tool/sites.py | 6 +-
python/samba/tests/samba_tool/user.py | 4 +-
.../tests/samba_tool/user_check_password_script.py | 4 +-
.../samba/tests/samba_tool/user_virtualCryptSHA.py | 5 +-
.../tests/samba_tool/user_virtualCryptSHA_base.py | 5 +-
python/samba/tests/samba_tool/user_wdigest.py | 4 +-
python/samba/tests/samba_tool/visualize.py | 4 +-
python/samba/tests/samba_tool/visualize_drs.py | 2 -
python/samba/tests/samba_upgradedns_lmdb.py | 4 +-
python/samba/tests/samdb.py | 4 +-
python/samba/tests/samdb_api.py | 5 +-
python/samba/tests/security.py | 6 +-
python/samba/tests/smb-notify.py | 4 +-
python/samba/tests/smb.py | 4 +-
python/samba/tests/smb3unix.py | 6 +-
python/samba/tests/smbd_base.py | 4 +-
python/samba/tests/subunitrun.py | 2 +-
python/samba/tests/tdb_util.py | 3 -
python/samba/tests/upgradeprovision.py | 4 +-
python/samba/tests/upgradeprovisionneeddc.py | 4 +-
source4/dsdb/tests/python/passwords.py | 17 ++--
source4/dsdb/tests/python/sam.py | 4 +-
156 files changed, 343 insertions(+), 441 deletions(-)
Changeset truncated at 500 lines:
diff --git a/python/pyglue.c b/python/pyglue.c
index 8fb5f7a1f9f..47e162a8631 100644
--- a/python/pyglue.c
+++ b/python/pyglue.c
@@ -27,6 +27,7 @@
#include "lib/util/debug.h"
#include "librpc/ndr/ndr_private.h"
#include "lib/cmdline/cmdline.h"
+#include "libcli/util/hresult.h"
void init_glue(void);
static PyObject *PyExc_NTSTATUSError;
@@ -632,5 +633,9 @@ MODULE_INIT_FUNC(_glue)
PyModule_AddObject(m, "DsExtendedError", PyExc_DsExtendedError);
}
+ PyModule_AddObject(m, "HRES_SEC_E_INVALID_TOKEN",
+ PyLong_FromUnsignedLongLong(HRES_ERROR_V(HRES_SEC_E_INVALID_TOKEN)));
+ PyModule_AddObject(m, "HRES_SEC_E_LOGON_DENIED",
+ PyLong_FromUnsignedLongLong(HRES_ERROR_V(HRES_SEC_E_LOGON_DENIED)));
return m;
}
diff --git a/python/samba/__init__.py b/python/samba/__init__.py
index 6eb0d01d1cf..13b646b65ae 100644
--- a/python/samba/__init__.py
+++ b/python/samba/__init__.py
@@ -292,7 +292,7 @@ def read_and_sub_file(file_name, subst_vars):
"""Read a file and sub in variables found in it
:param file_name: File to be read (typically from setup directory)
- param subst_vars: Optional variables to substitute in the file.
+ :param subst_vars: Optional variables to substitute in the file.
"""
with open(file_name, 'r', encoding="utf-8") as data_file:
data = data_file.read()
@@ -398,3 +398,6 @@ NTSTATUSError = _glue.NTSTATUSError
HRESULTError = _glue.HRESULTError
WERRORError = _glue.WERRORError
DsExtendedError = _glue.DsExtendedError
+
+HRES_SEC_E_LOGON_DENIED = _glue.HRES_SEC_E_LOGON_DENIED
+HRES_SEC_E_INVALID_TOKEN = _glue.HRES_SEC_E_INVALID_TOKEN
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index 9981e1390a2..c55525b2902 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -185,7 +185,7 @@ class TestCase(unittest.TestCase):
return "".join([name[0].lower(), name[1:]])
def setUp(self):
- super(TestCase, self).setUp()
+ super().setUp()
test_debug_level = os.getenv("TEST_DEBUG_LEVEL")
if test_debug_level is not None:
test_debug_level = int(test_debug_level)
@@ -326,7 +326,7 @@ class LdbTestCase(TestCase):
"""Trivial test case for running tests against a LDB."""
def setUp(self):
- super(LdbTestCase, self).setUp()
+ super().setUp()
self.tempfile = tempfile.NamedTemporaryFile(delete=False)
self.filename = self.tempfile.name
self.ldb = samba.Ldb(self.filename)
@@ -345,7 +345,7 @@ class LdbTestCase(TestCase):
class TestCaseInTempDir(TestCase):
def setUp(self):
- super(TestCaseInTempDir, self).setUp()
+ super().setUp()
self.tempdir = tempfile.mkdtemp()
self.addCleanup(self._remove_tempdir)
diff --git a/python/samba/tests/audit_log_base.py b/python/samba/tests/audit_log_base.py
index 73d0d8e306c..fa5ecc7cace 100644
--- a/python/samba/tests/audit_log_base.py
+++ b/python/samba/tests/audit_log_base.py
@@ -39,7 +39,7 @@ def getAudit(message):
class AuditLogTestBase(samba.tests.TestCase):
def setUp(self):
- super(AuditLogTestBase, self).setUp()
+ super().setUp()
# connect to the server's messaging bus (we need to explicitly load a
# different smb.conf here, because in all other respects this test
diff --git a/python/samba/tests/audit_log_dsdb.py b/python/samba/tests/audit_log_dsdb.py
index 09850961731..af623376cd1 100644
--- a/python/samba/tests/audit_log_dsdb.py
+++ b/python/samba/tests/audit_log_dsdb.py
@@ -40,7 +40,7 @@ class AuditLogDsdbTests(AuditLogTestBase):
def setUp(self):
self.message_type = MSG_DSDB_LOG
self.event_type = DSDB_EVENT_NAME
- super(AuditLogDsdbTests, self).setUp()
+ super().setUp()
self.server_ip = os.environ["SERVER_IP"]
@@ -92,7 +92,7 @@ class AuditLogDsdbTests(AuditLogTestBase):
def tearDown(self):
self.discardMessages()
- super(AuditLogDsdbTests, self).tearDown()
+ super().tearDown()
def haveExpectedTxn(self, expected):
if self.context["txnMessage"] is not None:
diff --git a/python/samba/tests/audit_log_pass_change.py b/python/samba/tests/audit_log_pass_change.py
index f7229a670d7..1039e17a180 100644
--- a/python/samba/tests/audit_log_pass_change.py
+++ b/python/samba/tests/audit_log_pass_change.py
@@ -45,7 +45,7 @@ class AuditLogPassChangeTests(AuditLogTestBase):
def setUp(self):
self.message_type = MSG_DSDB_PWD_LOG
self.event_type = DSDB_PWD_EVENT_NAME
- super(AuditLogPassChangeTests, self).setUp()
+ super().setUp()
self.server_ip = os.environ["SERVER_IP"]
@@ -98,9 +98,6 @@ class AuditLogPassChangeTests(AuditLogTestBase):
self.waitForMessages(1, dn=dn)
self.discardMessages()
- def tearDown(self):
- super(AuditLogPassChangeTests, self).tearDown()
-
def test_net_change_password(self):
dn = "CN=" + USER_NAME + ",CN=Users," + self.base_dn
diff --git a/python/samba/tests/auth.py b/python/samba/tests/auth.py
index 099826e0c62..3fedd5ec37f 100644
--- a/python/samba/tests/auth.py
+++ b/python/samba/tests/auth.py
@@ -28,7 +28,7 @@ import samba.tests
class AuthSystemSessionTests(samba.tests.TestCase):
def setUp(self):
- super(AuthSystemSessionTests, self).setUp()
+ super().setUp()
self.system_session = auth.system_session()
self.lp = samba.tests.env_loadparm()
@@ -62,7 +62,7 @@ class AuthSystemSessionTests(samba.tests.TestCase):
class AuthAdminSessionTests(samba.tests.TestCase):
def setUp(self):
- super(AuthAdminSessionTests, self).setUp()
+ super().setUp()
self.lp = samba.tests.env_loadparm()
self.admin_session = auth.admin_session(self.lp,
"S-1-5-21-2212615479-2695158682-2101375467")
diff --git a/python/samba/tests/auth_log.py b/python/samba/tests/auth_log.py
index 98ab4603f98..0307ed0d86d 100755
--- a/python/samba/tests/auth_log.py
+++ b/python/samba/tests/auth_log.py
@@ -47,12 +47,9 @@ import re
class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogTests, self).setUp()
+ super().setUp()
self.remoteAddress = os.environ["CLIENT_IP"]
- def tearDown(self):
- super(AuthLogTests, self).tearDown()
-
def smb_connection(self, creds, use_spnego="yes", ntlmv2_auth="yes",
force_smb1=False):
# the SMB bindings rely on having a s3 loadparm
diff --git a/python/samba/tests/auth_log_base.py b/python/samba/tests/auth_log_base.py
index 36304ecf796..131f019de43 100644
--- a/python/samba/tests/auth_log_base.py
+++ b/python/samba/tests/auth_log_base.py
@@ -100,7 +100,7 @@ class AuthLogTestBase(samba.tests.TestCase):
super().tearDownClass()
def setUp(self):
- super(AuthLogTestBase, self).setUp()
+ super().setUp()
type(self).discardMessages()
def isRemote(self, message):
diff --git a/python/samba/tests/auth_log_ncalrpc.py b/python/samba/tests/auth_log_ncalrpc.py
index 511e575d9bd..c671556afe2 100644
--- a/python/samba/tests/auth_log_ncalrpc.py
+++ b/python/samba/tests/auth_log_ncalrpc.py
@@ -32,12 +32,9 @@ from samba.dcerpc.windows_event_ids import (
class AuthLogTestsNcalrpc(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogTestsNcalrpc, self).setUp()
+ super().setUp()
self.remoteAddress = AS_SYSTEM_MAGIC_PATH_TOKEN
- def tearDown(self):
- super(AuthLogTestsNcalrpc, self).tearDown()
-
def _test_rpc_ncaclrpc(self, authTypes, binding, creds,
protection, checkFunction):
diff --git a/python/samba/tests/auth_log_netlogon.py b/python/samba/tests/auth_log_netlogon.py
index eabc4239a42..ac7e284b4fc 100644
--- a/python/samba/tests/auth_log_netlogon.py
+++ b/python/samba/tests/auth_log_netlogon.py
@@ -44,7 +44,7 @@ from samba.dcerpc.windows_event_ids import (
class AuthLogTestsNetLogon(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogTestsNetLogon, self).setUp()
+ super().setUp()
self.lp = samba.tests.env_loadparm()
self.session = system_session()
self.ldb = SamDB(
@@ -68,7 +68,7 @@ class AuthLogTestsNetLogon(samba.tests.auth_log_base.AuthLogTestBase):
"unicodePwd": utf16pw})
def tearDown(self):
- super(AuthLogTestsNetLogon, self).tearDown()
+ super().tearDown()
delete_force(self.ldb, self.dn)
def _test_netlogon(self, binding, checkFunction):
diff --git a/python/samba/tests/auth_log_netlogon_bad_creds.py b/python/samba/tests/auth_log_netlogon_bad_creds.py
index a74ea5c706d..e97ca851d11 100644
--- a/python/samba/tests/auth_log_netlogon_bad_creds.py
+++ b/python/samba/tests/auth_log_netlogon_bad_creds.py
@@ -47,7 +47,7 @@ from samba.dcerpc.windows_event_ids import (
class AuthLogTestsNetLogonBadCreds(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogTestsNetLogonBadCreds, self).setUp()
+ super().setUp()
self.lp = samba.tests.env_loadparm()
self.session = system_session()
self.ldb = SamDB(
@@ -71,7 +71,7 @@ class AuthLogTestsNetLogonBadCreds(samba.tests.auth_log_base.AuthLogTestBase):
"unicodePwd": utf16pw})
def tearDown(self):
- super(AuthLogTestsNetLogonBadCreds, self).tearDown()
+ super().tearDown()
delete_force(self.ldb, self.dn)
def _test_netlogon(self, name, pwd, status, checkFunction, event_id):
diff --git a/python/samba/tests/auth_log_pass_change.py b/python/samba/tests/auth_log_pass_change.py
index b8737effca6..29a9e38db1d 100644
--- a/python/samba/tests/auth_log_pass_change.py
+++ b/python/samba/tests/auth_log_pass_change.py
@@ -41,7 +41,7 @@ USER_PASS = samba.generate_random_password(32, 32)
class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogPassChangeTests, self).setUp()
+ super().setUp()
self.server_ip = os.environ["SERVER_IP"]
@@ -71,9 +71,6 @@ class AuthLogPassChangeTests(samba.tests.auth_log_base.AuthLogTestBase):
def _authDescription(self):
return "samr_ChangePasswordUser4"
- def tearDown(self):
- super(AuthLogPassChangeTests, self).tearDown()
-
def test_admin_change_password(self):
def isLastExpectedMessage(msg):
return ((msg["type"] == "Authentication") and
diff --git a/python/samba/tests/auth_log_samlogon.py b/python/samba/tests/auth_log_samlogon.py
index 8e86c646a00..f3dfebab0cc 100644
--- a/python/samba/tests/auth_log_samlogon.py
+++ b/python/samba/tests/auth_log_samlogon.py
@@ -44,7 +44,7 @@ from samba.dcerpc.windows_event_ids import (
class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
def setUp(self):
- super(AuthLogTestsSamLogon, self).setUp()
+ super().setUp()
self.lp = samba.tests.env_loadparm()
self.session = system_session()
self.ldb = SamDB(
@@ -60,7 +60,7 @@ class AuthLogTestsSamLogon(samba.tests.auth_log_base.AuthLogTestBase):
(self.netbios_name, self.base_dn))
def tearDown(self):
- super(AuthLogTestsSamLogon, self).tearDown()
+ super().tearDown()
delete_force(self.ldb, self.samlogon_dn)
def _test_samlogon(self, binding, creds, checkFunction):
diff --git a/python/samba/tests/auth_log_winbind.py b/python/samba/tests/auth_log_winbind.py
index 555d5348303..1445eff6984 100644
--- a/python/samba/tests/auth_log_winbind.py
+++ b/python/samba/tests/auth_log_winbind.py
@@ -120,7 +120,7 @@ class AuthLogTestsWinbind(AuthLogTestBase, BlackboxTestCase):
return list(filter(keep, messages))
def setUp(self):
- super(AuthLogTestsWinbind, self).setUp()
+ super().setUp()
self.domain = os.environ["DOMAIN"]
self.host = os.environ["SERVER"]
self.dc = os.environ["DC_SERVER"]
@@ -138,7 +138,7 @@ class AuthLogTestsWinbind(AuthLogTestBase, BlackboxTestCase):
self.remoteAddress = ''
def tearDown(self):
- super(AuthLogTestsWinbind, self).tearDown()
+ super().tearDown()
delete_force(self.ldb, self.user_dn)
#
diff --git a/python/samba/tests/blackbox/bug13653.py b/python/samba/tests/blackbox/bug13653.py
index 79b0af85ca1..215b9fcc378 100644
--- a/python/samba/tests/blackbox/bug13653.py
+++ b/python/samba/tests/blackbox/bug13653.py
@@ -128,7 +128,7 @@ class Bug13653Tests(BlackboxTestCase):
# Open a local connection to the SamDB
# and load configuration from the OS environment.
def setUp(self):
- super(Bug13653Tests, self).setUp()
+ super().setUp()
self.env = os.environ["TEST_ENV"]
self.server = os.environ["SERVER"]
self.prefix = os.environ["PREFIX_ABS"]
@@ -143,7 +143,7 @@ class Bug13653Tests(BlackboxTestCase):
# Delete the user account created by the test case.
# The user name is in self.user
def tearDown(self):
- super(Bug13653Tests, self).tearDown()
+ super().tearDown()
try:
dn = "CN=%s,CN=Users,%s" % (self.user, self.ldb.domain_dn())
delete_force(self.ldb, dn)
diff --git a/python/samba/tests/blackbox/downgradedatabase.py b/python/samba/tests/blackbox/downgradedatabase.py
index e4d772be83e..d850d1b5527 100644
--- a/python/samba/tests/blackbox/downgradedatabase.py
+++ b/python/samba/tests/blackbox/downgradedatabase.py
@@ -29,7 +29,7 @@ class DowngradeTestBase(BlackboxTestCase):
"""Test that sambadowngradedatabase downgrades the samba database"""
def setUp(self):
- super(DowngradeTestBase, self).setUp()
+ super().setUp()
if not hasattr(self, "backend"):
self.fail("Subclass this class and set 'backend'")
@@ -62,7 +62,7 @@ class DowngradeTestBase(BlackboxTestCase):
"bind-dns",
"msg.lock")
self.rm_files("names.tdb", "gencache.tdb")
- super(DowngradeTestBase, self).tearDown()
+ super().tearDown()
# Parse out the comments above each record that ldbdump produces
# containing pack format version and KV level key for each record.
diff --git a/python/samba/tests/blackbox/mdsearch.py b/python/samba/tests/blackbox/mdsearch.py
index 46af6f94624..8d67090e182 100644
--- a/python/samba/tests/blackbox/mdsearch.py
+++ b/python/samba/tests/blackbox/mdsearch.py
@@ -65,7 +65,7 @@ class MdssvcHTTPRequestHandler(BaseHTTPRequestHandler):
class MdfindBlackboxTests(BlackboxTestCase):
def setUp(self):
- super(MdfindBlackboxTests, self).setUp()
+ super().setUp()
self.server = HTTPServer(('10.53.57.35', 8080),
MdssvcHTTPRequestHandler,
@@ -83,7 +83,7 @@ class MdfindBlackboxTests(BlackboxTestCase):
f.close()
def tearDown(self):
- super(BlackboxTestCase, self).tearDown()
+ super().tearDown()
for file in testfiles:
os.remove("%s/%s" % (self.sharepath, file))
diff --git a/python/samba/tests/blackbox/netads_dns.py b/python/samba/tests/blackbox/netads_dns.py
index e9f945eaef9..3466344ef4a 100644
--- a/python/samba/tests/blackbox/netads_dns.py
+++ b/python/samba/tests/blackbox/netads_dns.py
@@ -28,7 +28,7 @@ COMMAND = "bin/net ads"
class NetAdsDnsTests(BlackboxTestCase):
def setUp(self):
- super(NetAdsDnsTests, self).setUp()
+ super().setUp()
nameserver = os.environ["DC_SERVER_IP"]
# filename=None will disable reading /etc/resolv.conf. The file might
# not exist e.g. on build or CI systems.
diff --git a/python/samba/tests/blackbox/netads_json.py b/python/samba/tests/blackbox/netads_json.py
index bcae96259c9..706ec3fba52 100644
--- a/python/samba/tests/blackbox/netads_json.py
+++ b/python/samba/tests/blackbox/netads_json.py
@@ -35,9 +35,6 @@ class BaseWrapper (object):
"""Blackbox tests for JSON output of the net ads suite of commands."""
subcmd = None
- def setUp(self):
- super(BaseWrapper.NetAdsJSONTests_Base, self).setUp()
-
def test_json_wellformed (self):
"""The output of ``--json`` commands must parse as JSON."""
argv = "%s %s --json" % (COMMAND, self.subcmd)
diff --git a/python/samba/tests/blackbox/samba_dnsupdate.py b/python/samba/tests/blackbox/samba_dnsupdate.py
index 8fcdd207f73..e326fbb592b 100644
--- a/python/samba/tests/blackbox/samba_dnsupdate.py
+++ b/python/samba/tests/blackbox/samba_dnsupdate.py
@@ -32,7 +32,7 @@ class SambaDnsUpdateTests(samba.tests.BlackboxTestCase):
def setUp(self):
self.server_ip = samba.tests.env_get_var_value("DNS_SERVER_IP")
- super(SambaDnsUpdateTests, self).setUp()
+ super().setUp()
try:
out = self.check_output("samba_dnsupdate --verbose")
self.assertTrue(b"Looking for DNS entry" in out, out)
diff --git a/python/samba/tests/blackbox/smbcacls.py b/python/samba/tests/blackbox/smbcacls.py
index 219ddc243cf..dd84f52a9bb 100644
--- a/python/samba/tests/blackbox/smbcacls.py
+++ b/python/samba/tests/blackbox/smbcacls.py
@@ -25,7 +25,7 @@ import os
class SmbCaclsBlockboxTestBase(BlackboxTestCase):
def setUp(self):
- super(SmbCaclsBlockboxTestBase, self).setUp()
+ super().setUp()
self.lp = s3param.get_context()
self.server = os.environ["SERVER"]
self.user = os.environ["USER"]
diff --git a/python/samba/tests/blackbox/smbcacls_basic.py b/python/samba/tests/blackbox/smbcacls_basic.py
index 7d313639863..766069255d4 100644
--- a/python/samba/tests/blackbox/smbcacls_basic.py
+++ b/python/samba/tests/blackbox/smbcacls_basic.py
@@ -20,9 +20,6 @@ from samba.tests import BlackboxProcessError
class BasicSmbCaclsTests(SmbCaclsBlockboxTestBase):
- def setUp(self):
- super(BasicSmbCaclsTests, self).setUp()
-
def test_simple_single_set(self):
"""test smbcacls '--set' attempts to overwrite the ACL for the file
diff --git a/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py b/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
index bdb00e9dc95..eed96d3ecf4 100644
--- a/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
+++ b/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
@@ -82,6 +82,3 @@ class DfsInheritanceSmbCaclsTests(InheritanceSmbCaclsTests):
self.smb_cacls(["--modify", file_acl_str, self.f1])
self.smb_cacls(["--modify", file_acl_str, self.f2])
self.smb_cacls(["--modify", file_acl_str, self.f3])
-
- def tearDown(self):
- super(DfsInheritanceSmbCaclsTests, self).tearDown()
diff --git a/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py b/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
index 87f4c4f43f5..cc13727b8fb 100644
--- a/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
+++ b/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
@@ -22,7 +22,7 @@ import os
class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
def setUp(self):
- super(InheritanceSmbCaclsTests, self).setUp()
+ super().setUp()
# create toplevel testdir structure with desired ACL(s)
#
@@ -62,7 +62,7 @@ class InheritanceSmbCaclsTests(SmbCaclsBlockboxTestBase):
if self.share != "tmp":
self.dirpath = os.path.join(os.environ["LOCAL_PATH"],self.share)
self.dirpath = os.path.join(self.dirpath,self.testdir)
- super(InheritanceSmbCaclsTests, self).tearDown()
+ super().tearDown()
def test_simple_oi_add(self):
"""test smbcacls '--propagate-inheritance --add' which attempts to add the ACL
diff --git a/python/samba/tests/blackbox/smbcacls_save_restore.py b/python/samba/tests/blackbox/smbcacls_save_restore.py
index 896e337b711..b3995310f7c 100644
--- a/python/samba/tests/blackbox/smbcacls_save_restore.py
+++ b/python/samba/tests/blackbox/smbcacls_save_restore.py
@@ -22,7 +22,7 @@ import os
class SaveRestoreSmbCaclsTests(SmbCaclsBlockboxTestBase):
def setUp(self):
- super(SaveRestoreSmbCaclsTests, self).setUp()
+ super().setUp()
# create toplevel testdir structure with desired ACL(s)
#
@@ -62,7 +62,7 @@ class SaveRestoreSmbCaclsTests(SmbCaclsBlockboxTestBase):
if self.share != "tmp":
self.dirpath = os.path.join(os.environ["LOCAL_PATH"],self.share)
self.dirpath = os.path.join(self.dirpath,self.testdir)
- super(SaveRestoreSmbCaclsTests, self).tearDown()
+ super().tearDown()
def test_simple_save_dir(self):
--
Samba Shared Repository
More information about the samba-cvs
mailing list