mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
tests/krb5: Allow specifying additional details when creating an account
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14817 (cherry picked from commit 4790b6b04ae145a2ebb418dd734487a6ba28a30c)
This commit is contained in:
parent
79ab000c19
commit
989b352023
@ -148,7 +148,7 @@ class KDCBaseTest(RawKerberosTest):
|
||||
return default_enctypes
|
||||
|
||||
def create_account(self, ldb, name, machine_account=False,
|
||||
spn=None, upn=None):
|
||||
spn=None, upn=None, additional_details=None):
|
||||
'''Create an account for testing.
|
||||
The dn of the created account is added to self.accounts,
|
||||
which is used by tearDownClass to clean up the created accounts.
|
||||
@ -180,6 +180,8 @@ class KDCBaseTest(RawKerberosTest):
|
||||
details["servicePrincipalName"] = spn
|
||||
if upn is not None:
|
||||
details["userPrincipalName"] = upn
|
||||
if additional_details is not None:
|
||||
details.update(additional_details)
|
||||
ldb.add(details)
|
||||
|
||||
creds = KerberosCredentials()
|
||||
|
Loading…
x
Reference in New Issue
Block a user