Andrew Bartlett 040a093654 Provide the correct principal name to verify_flags() for user2user tickets
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>
2021-06-23 11:56:04 +10:00
2021-04-20 12:01:54 -05:00
2021-03-17 13:05:46 -04:00
2021-05-21 11:00:58 -05:00
2021-06-22 13:01:24 -05:00
2020-04-15 19:05:21 -05:00
2020-05-26 11:48:45 -05:00
2004-02-12 14:19:16 +00:00
2021-01-13 20:17:21 -06:00
2000-06-07 10:01:25 +00:00
2002-08-21 13:29:08 +00:00
2019-06-07 22:03:05 -04:00
2014-08-23 19:14:10 -07:00
2017-09-29 12:37:30 -05:00
2017-04-13 18:06:39 -05:00
2019-11-20 18:14:44 -05:00
2020-06-26 11:29:15 -04:00
2011-07-24 22:45:55 -07:00
2020-06-26 11:30:48 -04:00
2019-06-09 13:43:47 -04:00
2010-01-05 19:21:45 +01:00

Travis-CI build (Linux, OS X) Appveyor-CI build (Windows) Coverage Status

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

Travis-CI build (Linux, OS X) Appveyor-CI build (Windows)

Languages
C 92.1%
Roff 2.8%
Shell 2.3%
Makefile 0.7%
M4 0.5%
Other 1.4%