1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00

CVE-2022-2031 tests/krb5: Add tests for kpasswd service

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15047
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15049
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>
This commit is contained in:
Joseph Sutton
2022-05-24 19:59:16 +12:00
committed by Jule Anger
parent 192d597c2f
commit 86698b313e
8 changed files with 1094 additions and 1 deletions

View File

@@ -510,6 +510,10 @@ class KerberosCredentials(Credentials):
def get_upn(self):
return self.upn
def update_password(self, password):
self.set_password(password)
self.set_kvno(self.get_kvno() + 1)
class KerberosTicketCreds:
def __init__(self, ticket, session_key,
@@ -528,6 +532,10 @@ class KerberosTicketCreds:
self.ticket_private = ticket_private
self.encpart_private = encpart_private
def set_sname(self, sname):
self.ticket['sname'] = sname
self.sname = sname
class RawKerberosTest(TestCaseInTempDir):
"""A raw Kerberos Test case."""