]> git.ipfire.org Git - thirdparty/krb5.git/commit
Defer primary KDC lookups 1300/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 24 Apr 2023 22:22:40 +0000 (18:22 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sun, 16 Jul 2023 22:16:09 +0000 (18:16 -0400)
commitfabbf11f457a84904a5fa251584fd660a52fa583
treec48c3b22ae3ff61cd26332a644cfdba61509f1bf
parentef08b09c9459551aabbe7924fb176f1583053cdd
Defer primary KDC lookups

Add an internal variant of krb5_sendto_kdc() which records the
answering KDC in a list.  Callers can check the list for replica KDC
use after the success or failure of the KDC exchange is determined,
avoiding DNS queries for the primary KDCs in many common cases and
using fewer DNS queries in other cases.

Perform the fallback in k5_get_init_creds() rather than
krb5_get_init_creds_password().  For now we must additionally perform
the fallback in krb5_get_init_creds_keytab() as it does not use
k5_get_init_creds().

Preserve the current signature of krb5_sendto_kdc() (it is used within
the tree outside of libkrb5, and might be used by other software
despite being non-public), but remove the behavior of setting
*use_primary.

ticket: 7721
14 files changed:
src/include/k5-trace.h
src/lib/krb5/krb/gc_via_tkt.c
src/lib/krb5/krb/get_creds.c
src/lib/krb5/krb/get_etype_info.c
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/gic_keytab.c
src/lib/krb5/krb/gic_pwd.c
src/lib/krb5/krb/in_tkt_sky.c
src/lib/krb5/krb/int-proto.h
src/lib/krb5/os/locate_kdc.c
src/lib/krb5/os/os-proto.h
src/lib/krb5/os/sendto_kdc.c
src/tests/Makefile.in
src/tests/t_sendto_kdc.py [new file with mode: 0644]