summaryrefslogtreecommitdiff
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-24 11:42:01 +0200
commit245d9a42329a1bfeb3db8431ef105e7758080e14 (patch)
treef5afb96960f21036d89e29e4c2b6eb4c2a310451
parent8917979641abb03ef858ba72b652178475b6e918 (diff)
downloadsamba-245d9a42329a1bfeb3db8431ef105e7758080e14.tar.gz
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>
-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 2117663b26b..685a6f71f88 100644
--- a/python/samba/tests/krb5/kdc_base_test.py
+++ b/python/samba/tests/krb5/kdc_base_test.py
@@ -1048,6 +1048,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 4120edf93b9..a9a98c36cbf 100644
--- a/python/samba/tests/krb5/raw_testcase.py
+++ b/python/samba/tests/krb5/raw_testcase.py
@@ -834,6 +834,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,