From eb85614c241c644d1c623530ee1bd5a190b3d4fb Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Fri, 10 Dec 2021 11:02:17 +1100 Subject: [PATCH] Revert "s4/heimdal/lib/krb5/pac.c: Align PAC buffers to match Windows" This reverts commit 24a7a82e822935bfbefa3145fc8aac46d2da79c4. After further discussion in #863, the alignment (which differs according to info buffer type) should be handled by the caller. --- lib/krb5/pac.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/krb5/pac.c b/lib/krb5/pac.c index bbf65c027..0f91ac1ee 100644 --- a/lib/krb5/pac.c +++ b/lib/krb5/pac.c @@ -62,12 +62,10 @@ struct krb5_pac_data { #define PACTYPE_SIZE 8 #define PAC_INFO_BUFFER_SIZE 16 -#define PAC_LOGON_INFO 1 #define PAC_SERVER_CHECKSUM 6 #define PAC_PRIVSVR_CHECKSUM 7 #define PAC_LOGON_NAME 10 #define PAC_CONSTRAINED_DELEGATION 11 -#define PAC_UPN_DNS_INFO 12 #define PAC_TICKET_CHECKSUM 16 #define CHECK(r,f,l) \ @@ -1201,17 +1199,7 @@ _krb5_pac_sign(krb5_context context, ret = krb5_enomem(context); goto out; } - - if (p->pac->buffers[i].type == PAC_LOGON_INFO - || p->pac->buffers[i].type == PAC_UPN_DNS_INFO) - { - uint32_t rounded = (len + PAC_ALIGNMENT - 1) / PAC_ALIGNMENT - * PAC_ALIGNMENT; - uint32_t remaining = rounded - len; - CHECK(ret, fill_zeros(context, spdata, remaining), out); - - len = rounded; - } + /* XXX if not aligned, fill_zeros */ } /* write header */