]> git.ipfire.org Git - thirdparty/krb5.git/commit
Perform atomic ccache refreshes when possible 1207/head
authorGreg Hudson <ghudson@mit.edu>
Tue, 17 Aug 2021 15:26:59 +0000 (11:26 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 25 Aug 2021 15:59:32 +0000 (11:59 -0400)
commit371f09d4bf4ca0c7ba15c5ef909bc35307ed9cc3
tree940abd33bbf18a1398392d5da495995483e969c6
parent6fe25e755f510c0fc86b899d96db9f80acf03ac5
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().

ticket: 7707
15 files changed:
src/clients/kinit/kinit.c
src/clients/kvno/kvno.c
src/include/kcm.h
src/lib/krb5/ccache/cc-int.h
src/lib/krb5/ccache/cc_dir.c
src/lib/krb5/ccache/cc_file.c
src/lib/krb5/ccache/cc_kcm.c
src/lib/krb5/ccache/cc_memory.c
src/lib/krb5/ccache/ccbase.c
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/t_vfy_increds.c
src/tests/Makefile.in
src/tests/conccache.c [new file with mode: 0644]
src/tests/kcmserver.py
src/tests/t_ccache.py