kdc: correctly generate PAC TGS signature
commite5ca4a51c80cca54d4484032268716cee139792b
authorLuke Howard <lukeh@padl.com>
Thu, 23 Sep 2021 07:51:51 +0000 (23 17:51 +1000)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Oct 2021 22:37:10 +0000 (27 22:37 +0000)
tree37f787f8c5cdb70b7887daba7f5cb44b4d981d3e
parent61fb0ba82c65734c6ed9b85b8dab4db72bd47fd0
kdc: correctly generate PAC TGS signature

When generating an AS-REQ, the TGS signature was incorrectly generated using
the server key, which would fail to validate if the server was not also the
TGS. Fix this.

Patch from Isaac Bourkis <iboukris@gmail.com>.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14881

[jsutton@samba.org Backported from Heimdal commit
 e7863e2af922809dad25a2e948e98c408944d551
 - Samba's Heimdal version does not have the generate_pac() helper
 function.
 - Samba's Heimdal version does not use the 'r' context variable.
]

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 91e684f5dcb48b76e6a322c15acb53cbce5c275a)
source4/heimdal/kdc/kerberos5.c