1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
samba-mirror/third_party
Samuel Cabrero 971441ca52 third_party/heimdal: Fix build with gcc version 12.1
Split lib/krb5/crypto to its own subsystem to built with its own CFLAGS
and avoid the following error:

    [1510/4771] Compiling third_party/heimdal/lib/krb5/crypto.c
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘_krb5_internal_hmac’:
    ../../third_party/heimdal/lib/krb5/crypto.c:302:24: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
      302 |     iov[0].data.data = (void *) data;
          |                        ^
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘derive_key_sp800_hmac’:
    ../../third_party/heimdal/lib/krb5/crypto.c:2427:18: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
     2427 |     label.data = (void *)constant;
          |                  ^
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘decrypt_internal_derived’:
    ../../third_party/heimdal/lib/krb5/crypto.c:1280:9: error: pointer ‘p’ may be used after ‘realloc’ [-Werror=use-after-free]
     1280 |         free(p);
          |         ^~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c:1278:20: note: call to ‘realloc’ here
     1278 |     result->data = realloc(p, l);
          |                    ^~~~~~~~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘decrypt_internal_enc_then_cksum’:
    ../../third_party/heimdal/lib/krb5/crypto.c:1365:9: error: pointer ‘p’ may be used after ‘realloc’ [-Werror=use-after-free]
     1365 |         free(p);
          |         ^~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c:1363:20: note: call to ‘realloc’ here
     1363 |     result->data = realloc(p, l);
          |                    ^~~~~~~~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘decrypt_internal’:
    ../../third_party/heimdal/lib/krb5/crypto.c:1431:9: error: pointer ‘p’ may be used after ‘realloc’ [-Werror=use-after-free]
     1431 |         free(p);
          |         ^~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c:1429:20: note: call to ‘realloc’ here
     1429 |     result->data = realloc(p, l);
          |                    ^~~~~~~~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c: In function ‘decrypt_internal_special’:
    ../../third_party/heimdal/lib/krb5/crypto.c:1478:9: error: pointer ‘p’ may be used after ‘realloc’ [-Werror=use-after-free]
     1478 |         free(p);
          |         ^~~~~~~
    ../../third_party/heimdal/lib/krb5/crypto.c:1476:20: note: call to ‘realloc’ here
     1476 |     result->data = realloc(p, sz);
          |                    ^~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Samuel Cabrero <scabrero@samba.org>
Autobuild-Date(master): Tue Jun 14 10:16:18 UTC 2022 on sn-devel-184
2022-06-14 10:16:18 +00:00
..
aesni-intel lib:crypto: Build intel aes-ni only if GnuTLS doesn't provide AES CMAC 2019-12-10 20:30:57 +00:00
cmocka third_party:cmocka: Fix build when used in lib/tevent 2021-07-07 05:07:30 +00:00
gpfs third_party: Update gpfs.h to 5.0.5.3 version 2020-10-05 20:06:04 +00:00
heimdal third_party/heimdal: import lorikeet-heimdal-202203101710 (commit df8d801544144949931cd742169be1207b239c3d) 2022-03-11 18:06:47 +00:00
heimdal_build third_party/heimdal: Fix build with gcc version 12.1 2022-06-14 10:16:18 +00:00
nss_wrapper third_party: Update nss_wrapper to version 1.1.11 2020-04-06 17:34:53 +00:00
pam_wrapper third_party: Update pam_wrapper to version 1.1.4 2021-10-28 19:03:04 +00:00
popt third_party/popt/wscript: update to handle waf 2.0.4 2018-09-05 06:37:24 +02:00
resolv_wrapper waf: Fix resolv_wrapper with glibc 2.34 2021-11-05 11:44:30 +00:00
socket_wrapper third_party: Update socket_wrapper to version 1.3.3 2021-03-17 23:53:04 +00:00
uid_wrapper third_party: Link uid_wrapper against pthread 2019-09-25 15:39:40 +00:00
waf third_party: Update waf to version 2.0.24 2022-05-23 09:34:51 +00:00
update.sh third_party/update: forget pep8 2021-11-19 13:25:16 +00:00
wscript third_party:waf: Do not recurse in aesni-intel if GnuTLS provides the cipher 2022-04-04 19:31:28 +00:00