]> git.ipfire.org Git - thirdparty/krb5.git/commit
Restrict pre-authentication fallback cases 758/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 5 Apr 2018 20:23:34 +0000 (16:23 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 9 Apr 2018 15:26:11 +0000 (11:26 -0400)
commit7a24a088c16d326127dd2b29084d4ca085c70d10
tree2fee2aa80ebaa979889f28930deca3b0907a5fa0
parentf240f1b0d324312be8aa59ead7cfbe0c329ed064
Restrict pre-authentication fallback cases

Add a new callback disable_fallback() and call it from each clpreauth
module when it generates a client message using credentials to
authenticate.  (For SPAKE, this is the message responding to a
challenge; for all other current mechanisms, it is the first and only
client message.)  If disable_fallback() is called, do not try another
mechanism after a KDC error.

Remove k5_reset_preauth_types_tried() and its call sites, so that
preauth mechanisms which are tried optimistically will no longer be
retried after a failure.

ticket: 8654
14 files changed:
src/include/krb5/clpreauth_plugin.h
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/init_creds_ctx.h
src/lib/krb5/krb/int-proto.h
src/lib/krb5/krb/preauth2.c
src/lib/krb5/krb/preauth_ec.c
src/lib/krb5/krb/preauth_encts.c
src/lib/krb5/krb/preauth_otp.c
src/lib/krb5/krb/preauth_sam2.c
src/plugins/preauth/pkinit/pkinit_clnt.c
src/plugins/preauth/spake/spake_client.c
src/plugins/preauth/test/cltest.c
src/tests/t_preauth.py
src/tests/t_spake.py