1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python: Make credentials cache test run against Windows

Windows, unlike Samba, requires the service principal name to be set
when requesting a ticket to that service.

Additionally, default_realm from the libdefaults section of krb5.conf
should be set so that the correct realm is used.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 19 02:22:01 UTC 2021 on sn-devel-184
This commit is contained in:
Joseph Sutton 2021-05-10 15:06:06 +12:00 committed by Jeremy Allison
parent b9006f3334
commit 7791acb074

View File

@ -47,13 +47,16 @@ class CcacheTests(KDCBaseTest):
user_name = "ccacheusr"
mach_name = "ccachemac"
service = "host"
# Create the user account.
(user_credentials, _) = self.create_account(user_name)
# Create the machine account.
(mach_credentials, _) = self.create_account(mach_name,
machine_account=True)
machine_account=True,
spn="%s/%s" % (service,
mach_name))
# 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