1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

tests/krb5: Allow creating an account with an assigned policy or silo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-04-05 11:21:39 +12:00 committed by Andrew Bartlett
parent e7b2cd7d83
commit eb4b46d326

View File

@ -1642,6 +1642,8 @@ class KDCBaseTest(RawKerberosTest):
'secure_channel_type': None,
'id': None,
'force_nt4_hash': False,
'assigned_policy': None,
'assigned_silo': None,
}
account_opts = {
@ -1692,7 +1694,9 @@ class KDCBaseTest(RawKerberosTest):
kerberos_enabled,
secure_channel_type,
id,
force_nt4_hash):
force_nt4_hash,
assigned_policy,
assigned_silo):
if account_type is self.AccountType.USER:
self.assertIsNone(spn)
self.assertIsNone(delegation_to_spn)
@ -1751,6 +1755,12 @@ class KDCBaseTest(RawKerberosTest):
if spn is None and account_type is not self.AccountType.USER:
spn = 'host/' + user_name
if assigned_policy is not None:
details['msDS-AssignedAuthNPolicy'] = assigned_policy
if assigned_silo is not None:
details['msDS-AssignedAuthNPolicySilo'] = assigned_silo
creds, dn = self.create_account(samdb, user_name,
account_type=account_type,
upn=upn,