1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Revert "s4/heimdal/lib/krb5/pac.c: Align PAC buffers to match Windows"

This alignment should be done on the Samba side instead.

This reverts commit 28a5a586c8.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2021-12-14 19:19:42 +13:00 committed by Andrew Bartlett
parent 7dfcbc4e38
commit 31f3e81579
2 changed files with 15 additions and 13 deletions

View File

@ -98,3 +98,17 @@
^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_fast_service_ticket
^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_fast_sid_mismatch_existing
^samba.tests.krb5.kdc_tgs_tests.samba.tests.krb5.kdc_tgs_tests.KdcTgsTests.test_fast_sid_mismatch_nonexisting
#
# PAC alignment tests
#
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_7_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_8_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_9_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_11_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_12_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_13_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_15_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_16_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_17_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_19_chars
^samba.tests.krb5.pac_align_tests.samba.tests.krb5.pac_align_tests.PacAlignTests.test_pac_align_20_chars

View File

@ -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) \
@ -1192,17 +1190,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 */