]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Check logon name in PAC
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 11 Oct 2021 01:48:03 +0000 (14:48 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Oct 2021 18:59:31 +0000 (18:59 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/raw_testcase.py

index dbcff787f7040eabb19df9e24242c7942d639bd7..b0cd2bfdf0f903e4a3b6e59670ccb05294248926 100644 (file)
@@ -2552,6 +2552,12 @@ class RawKerberosTest(TestCaseInTempDir):
                 self.assertEqual(expected_transited_services,
                                  transited_services)
 
+            elif pac_buffer.type == krb5pac.PAC_TYPE_LOGON_NAME:
+                expected_cname = kdc_exchange_dict['expected_cname']
+                account_name = expected_cname['name-string'][0]
+
+                self.assertEqual(account_name, pac_buffer.info.account_name)
+
     def generic_check_kdc_error(self,
                                 kdc_exchange_dict,
                                 callback_dict,