]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: Remove unused netlogon connection parameter
authorJo Sutton <josutton@catalyst.net.nz>
Tue, 30 Apr 2024 02:34:44 +0000 (14:34 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 16 May 2024 02:11:36 +0000 (02:11 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/py_credentials.py

index 3db72822c93c3d1ddbd1aff5adaf6dcfc8d890f6..a3887202b6c6c5c711152037ebef83fa429e26c9 100644 (file)
@@ -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"]]