1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-09 09:57:48 +03:00

tests/krb5: Run test_rpc against member server

We were instead always running against the DC.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 167bd2070483004cd0b9a96ffb40ea73c6ddf579)
This commit is contained in:
Joseph Sutton 2021-11-24 16:02:00 +13:00 committed by Jule Anger
parent 837453d347
commit 3d48ade670

View File

@ -58,7 +58,7 @@ class RpcTests(KDCBaseTest):
samdb = self.get_samdb()
mach_name = samdb.host_dns_name()
mach_name = self.host
service = "cifs"
# Create the user account.
@ -67,7 +67,7 @@ class RpcTests(KDCBaseTest):
use_cache=False)
user_name = user_credentials.get_username()
mach_credentials = self.get_dc_creds()
mach_credentials = self.get_server_creds()
# Talk to the KDC to obtain the service ticket, which gets placed into
# the cache. The machine account name has to match the name in the
@ -114,8 +114,7 @@ class RpcTests(KDCBaseTest):
self.assertEqual(user_name, account_name.string)
def test_rpc_anonymous(self):
samdb = self.get_samdb()
mach_name = samdb.host_dns_name()
mach_name = self.host
anon_creds = credentials.Credentials()
anon_creds.set_anonymous()
@ -125,7 +124,7 @@ class RpcTests(KDCBaseTest):
(account_name, _) = conn.GetUserName(None, None, None)
self.assertEqual('ANONYMOUS LOGON', account_name.string)
self.assertEqual('ANONYMOUS LOGON', account_name.string.upper())
if __name__ == "__main__":