mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
CVE-2020-25719 tests/krb5: Add method to get unique username for test accounts
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14686 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
4a792ad92d
commit
dbedf5b6e2
@ -711,8 +711,7 @@ class KDCBaseTest(RawKerberosTest):
|
||||
|
||||
rodc_dn = self.get_server_dn(rodc_samdb)
|
||||
|
||||
user_name = self.account_base + str(self.account_id)
|
||||
type(self).account_id += 1
|
||||
user_name = self.get_new_username()
|
||||
if name_prefix is not None:
|
||||
user_name = name_prefix + user_name
|
||||
if name_suffix is not None:
|
||||
@ -821,6 +820,12 @@ class KDCBaseTest(RawKerberosTest):
|
||||
|
||||
return creds
|
||||
|
||||
def get_new_username(self):
|
||||
user_name = self.account_base + str(self.account_id)
|
||||
type(self).account_id += 1
|
||||
|
||||
return user_name
|
||||
|
||||
def get_client_creds(self,
|
||||
allow_missing_password=False,
|
||||
allow_missing_keys=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user