summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-05-24 19:06:53 +1200
committerJule Anger <janger@samba.org>2022-07-27 10:52:36 +0000
commitebccd0440aa6739a46e057dac738dc13a7d9a42a (patch)
tree70723519c8a220e246e5ccf6d9c8406991ff19b7 /python
parenta118881f4fbbc926566b359ef944369ab948d5de (diff)
downloadsamba-ebccd0440aa6739a46e057dac738dc13a7d9a42a.tar.gz
samba-ebccd0440aa6739a46e057dac738dc13a7d9a42a.tar.bz2
samba-ebccd0440aa6739a46e057dac738dc13a7d9a42a.zip
CVE-2022-32744 tests/krb5: Correctly calculate salt for pre-existing accounts
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15074 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/krb5/kdc_base_test.py1
-rw-r--r--python/samba/tests/krb5/raw_testcase.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/python/samba/tests/krb5/kdc_base_test.py b/python/samba/tests/krb5/kdc_base_test.py
index 54beae22718..4cc006c6faf 100644
--- a/python/samba/tests/krb5/kdc_base_test.py
+++ b/python/samba/tests/krb5/kdc_base_test.py
@@ -1157,6 +1157,7 @@ class KDCBaseTest(RawKerberosTest):
kvno = int(res[0]['msDS-KeyVersionNumber'][0])
creds.set_kvno(kvno)
+ creds.set_workstation(username[:-1])
creds.set_dn(dn)
keys = self.get_keys(samdb, dn)
diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py
index d0c28fb2002..8d2b84c9d7f 100644
--- a/python/samba/tests/krb5/raw_testcase.py
+++ b/python/samba/tests/krb5/raw_testcase.py
@@ -869,6 +869,7 @@ class RawKerberosTest(TestCaseInTempDir):
allow_missing_password=allow_missing_password,
allow_missing_keys=allow_missing_keys)
c.set_gensec_features(c.get_gensec_features() | FEATURE_SEAL)
+ c.set_workstation('')
return c
def get_rodc_krbtgt_creds(self,