From: Joseph Sutton Date: Wed, 24 Nov 2021 03:02:00 +0000 (+1300) Subject: tests/krb5: Run test_rpc against member server X-Git-Tag: samba-4.14.14~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d48ade670bb5b026d7bc0a26a4fa6775b21653b;p=thirdparty%2Fsamba.git tests/krb5: Run test_rpc against member server We were instead always running against the DC. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett (cherry picked from commit 167bd2070483004cd0b9a96ffb40ea73c6ddf579) --- diff --git a/python/samba/tests/krb5/test_rpc.py b/python/samba/tests/krb5/test_rpc.py index 03c125f518a..2d483986e83 100755 --- a/python/samba/tests/krb5/test_rpc.py +++ b/python/samba/tests/krb5/test_rpc.py @@ -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__":