040a093654bfbb602ef0ab9807f51a5c83cf9596

When b->kdc_options.enc_tkt_in_skey is set, the variable 'spn' provided to verify_flags() for the purpose of logging is not yet set, it is still NULL from the initialiser. On Samba we see, when compiling with -O3 and strict warning rules with gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04): $ make -k PYTHONHASHSEED=1 WAF_MAKE=1 ./buildtools/bin/waf build Waf: Entering directory `/home/abartlet/heimdal-import/samba/bin/default' Selected embedded Heimdal build [2822/4527] Compiling source4/heimdal/kdc/krb5tgs.c In function ‘verify_flags’, inlined from ‘verify_flags’ at ../../source4/heimdal/kdc/krb5tgs.c:625:1, inlined from ‘tgs_build_reply.isra.0’ at ../../source4/heimdal/kdc/krb5tgs.c:1671:8: ../../source4/heimdal/kdc/krb5tgs.c:635:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 635 | kdc_log(context, config, 4, "Ticket not valid (%s)", pstr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘verify_flags’, inlined from ‘tgs_build_reply.isra.0’ at ../../source4/heimdal/kdc/krb5tgs.c:1671:8: ../../source4/heimdal/kdc/krb5tgs.c:631:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 631 | kdc_log(context, config, 4, "Ticket expired (%s)", pstr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Essentially, with an optimising compiler, the funciton is inlined and the compiler notices that the kdc_log() argument is always NULL. Based on patches by Stefan Metzmacher <metze@samba.org> in his master-heimdal branch at: https://git.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=2ac326b9cb8f896f874edfa6725f087034270322#patch2 https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master-heimdal Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Heimdal
Heimdal is an implementation of:
- ASN.1/DER,
- PKIX, and
- Kerberos.
For information how to install see here.
There are man pages for most of the commands.
Bug reports and bugs are appreciated. Use GitHub issues.
For more information see the project homepage https://heimdal.software/heimdal/ or the mailing lists:
heimdal-announce@heimdal.software low-volume announcement heimdal-discuss@heimdal.software high-volume discussion
send mail to heimdal-announce-subscribe@heimdal.software and heimdal-discuss-subscribe@heimdal.software respectively to subscribe.
Build Status
Description
Languages
C
92.1%
Roff
2.8%
Shell
2.3%
Makefile
0.7%
M4
0.5%
Other
1.4%