python/samba/krb5: Allow client address (caddr) to be missing or empty
authorAndrew Bartlett <abartlet@samba.org>
Wed, 13 Mar 2024 23:01:54 +0000 (12:01 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 28 Mar 2024 01:50:41 +0000 (01:50 +0000)
Currently (as of 2024-02) windows 21H2 returns this as [].

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

index 85daacf88ce02898986925c7332bd4aefc8be39b..5c9bdb0fd8e5ff05fcc39cc7d59665ecea3fd98d 100644 (file)
@@ -3954,7 +3954,9 @@ class RawKerberosTest(TestCase):
                     self.assertElementPresent(ticket_private, 'renew-till')
                 else:
                     self.assertElementMissing(ticket_private, 'renew-till')
-            if self.strict_checking:
+            if self.strict_checking and \
+               self.getElementValue(ticket_private,
+                                    'caddr') != []:
                 self.assertElementMissing(ticket_private, 'caddr')
             if expect_pac is not None:
                 if expect_pac:
@@ -4011,8 +4013,10 @@ class RawKerberosTest(TestCase):
                                         expected_srealm)
             self.assertElementEqualPrincipal(encpart_private, 'sname',
                                              expected_sname)
-            if self.strict_checking:
-                self.assertElementMissing(encpart_private, 'caddr')
+            if self.strict_checking and \
+               self.getElementValue(ticket_private,
+                                    'caddr') != []:
+                self.assertElementMissing(ticket_private, 'caddr')
 
             sent_pac_options = self.get_sent_pac_options(kdc_exchange_dict)