mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
python:tests: Remove unused netlogon connection parameter
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
170dd47eae
commit
e875193c1c
@ -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"]]
|
||||
|
Loading…
Reference in New Issue
Block a user