[krbdev.mit.edu #7707] git commit

Greg Hudson via RT rt at krbdev.mit.edu
Wed Aug 25 12:13:50 EDT 2021


<URL: https://krbdev.mit.edu/rt/Ticket/Display.html?id=7707 >


Perform atomic ccache refreshes when possible

Allow ccache types to implement atomic replacement via a new replace
method (replacing the unused "move" vtable slot).  Make krb5_cc_move()
use this method when possible, falling back to non-atomic replacement.
Implement atomic replacement for FILE, DIR, MEMORY, and KCM (using a
new opcode, falling back when it is not implemented).

Use krb5_cc_move() in get_in_tkt.c when an output ccache is specified,
in kinit for ticket validation and renewal, and in kvno --out-cache.

Add a test program to exercise concurrent krb5_get_credentials() and
cache refresh.

This commit does not implement atomic replacement for KEYRING or for
gss_store_creds().

https://github.com/krb5/krb5/commit/371f09d4bf4ca0c7ba15c5ef909bc35307ed9cc3
Author: Greg Hudson <ghudson at mit.edu>
Commit: 371f09d4bf4ca0c7ba15c5ef909bc35307ed9cc3
Branch: master
 src/clients/kinit/kinit.c        |   22 ++++-
 src/clients/kvno/kvno.c          |   24 ++++-
 src/include/kcm.h                |    2 +
 src/lib/krb5/ccache/cc-int.h     |    8 +-
 src/lib/krb5/ccache/cc_dir.c     |   11 ++-
 src/lib/krb5/ccache/cc_file.c    |  110 ++++++++++++++++++-----
 src/lib/krb5/ccache/cc_kcm.c     |   39 ++++++++-
 src/lib/krb5/ccache/cc_memory.c  |  100 +++++++++++++-------
 src/lib/krb5/ccache/ccbase.c     |  119 +++++++++++++++++-------
 src/lib/krb5/krb/get_in_tkt.c    |   83 ++++++++++++-----
 src/lib/krb5/krb/t_vfy_increds.c |   15 ++-
 src/tests/Makefile.in            |   23 +++--
 src/tests/conccache.c            |  190 ++++++++++++++++++++++++++++++++++++++
 src/tests/kcmserver.py           |   74 ++++++++++-----
 src/tests/t_ccache.py            |    5 +
 15 files changed, 661 insertions(+), 164 deletions(-)



More information about the krb5-bugs mailing list