From e875193c1ca7025d4929090dce731a074a9dd4e1 Mon Sep 17 00:00:00 2001 From: Jo Sutton Date: Tue, 30 Apr 2024 14:34:44 +1200 Subject: [PATCH] python:tests: Remove unused netlogon connection parameter Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- python/samba/tests/py_credentials.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/python/samba/tests/py_credentials.py b/python/samba/tests/py_credentials.py index 3db72822c93..a3887202b6c 100644 --- a/python/samba/tests/py_credentials.py +++ b/python/samba/tests/py_credentials.py @@ -99,19 +99,19 @@ class PyCredentialsTests(TestCase): # an authenticator def test_client_authenticator(self): c = self.get_netlogon_connection() - (authenticator, subsequent) = self.get_authenticator(c) + (authenticator, subsequent) = self.get_authenticator() self.do_NetrLogonSamLogonWithFlags(c, authenticator, subsequent) - (authenticator, subsequent) = self.get_authenticator(c) + (authenticator, subsequent) = self.get_authenticator() self.do_NetrLogonGetDomainInfo(c, authenticator, subsequent) - (authenticator, subsequent) = self.get_authenticator(c) + (authenticator, subsequent) = self.get_authenticator() self.do_NetrLogonGetDomainInfo(c, authenticator, subsequent) - (authenticator, subsequent) = self.get_authenticator(c) + (authenticator, subsequent) = self.get_authenticator() self.do_NetrLogonGetDomainInfo(c, authenticator, subsequent) # Test using LogonGetDomainInfo to update dNSHostName to an allowed value. def test_set_dns_hostname_valid(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() domain_hostname = self.ldb.domain_dns_name() @@ -144,7 +144,7 @@ class PyCredentialsTests(TestCase): # when we are denied the right to do so. def test_set_dns_hostname_valid_denied(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() res = self.ldb.search(self.machine_dn, scope=ldb.SCOPE_BASE, @@ -192,7 +192,7 @@ class PyCredentialsTests(TestCase): # invalid value, even with Validated Write. def test_set_dns_hostname_invalid_validated_write(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() res = self.ldb.search(self.machine_dn, scope=ldb.SCOPE_BASE, @@ -237,7 +237,7 @@ class PyCredentialsTests(TestCase): # invalid value, even with Write Property. def test_set_dns_hostname_invalid_write_property(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() res = self.ldb.search(self.machine_dn, scope=ldb.SCOPE_BASE, @@ -282,7 +282,7 @@ class PyCredentialsTests(TestCase): # machine name. def test_set_dns_hostname_to_machine_name(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() new_dns_hostname = self.machine_name.encode('utf-8') @@ -312,7 +312,7 @@ class PyCredentialsTests(TestCase): # suffix. def test_set_dns_hostname_invalid_suffix(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() domain_hostname = self.ldb.domain_dns_name() @@ -345,7 +345,7 @@ class PyCredentialsTests(TestCase): # update, but other attributes are still updated. def test_set_dns_hostname_with_flag(self): c = self.get_netlogon_connection() - authenticator, subsequent = self.get_authenticator(c) + authenticator, subsequent = self.get_authenticator() domain_hostname = self.ldb.domain_dns_name() @@ -505,7 +505,7 @@ class PyCredentialsTests(TestCase): def do_Netr_ServerPasswordSet2(self): c = self.get_netlogon_connection() - (authenticator, subsequent) = self.get_authenticator(c) + (authenticator, subsequent) = self.get_authenticator() PWD_LEN = 32 DATA_LEN = 512 newpass = samba.generate_random_password(PWD_LEN, PWD_LEN) @@ -589,7 +589,7 @@ class PyCredentialsTests(TestCase): # # Get the authenticator from the machine creds. - def get_authenticator(self, c): + def get_authenticator(self): auth = self.machine_creds.new_client_authenticator() current = netr_Authenticator() current.cred.data = [x if isinstance(x, int) else ord(x) for x in auth["credential"]]