krb5 commit: Don't fall back to master on password read error

Greg Hudson ghudson at mit.edu
Fri Apr 8 17:22:59 EDT 2016


https://github.com/krb5/krb5/commit/913bd4332123929909553ba7271c767606e8f1c7
commit 913bd4332123929909553ba7271c767606e8f1c7
Author: Greg Hudson <ghudson at mit.edu>
Date:   Mon Mar 14 11:06:49 2016 -0400

    Don't fall back to master on password read error
    
    If a password or other prompted value cannot be read, retrying with
    the master KDC is confusing because it prompts again for the same
    input.
    
    ticket: 8381 (new)

 src/lib/krb5/krb/gic_pwd.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/lib/krb5/krb/gic_pwd.c b/src/lib/krb5/krb/gic_pwd.c
index e95673f..55aa9d6 100644
--- a/src/lib/krb5/krb/gic_pwd.c
+++ b/src/lib/krb5/krb/gic_pwd.c
@@ -326,9 +326,8 @@ krb5_get_init_creds_password(krb5_context context,
     /* If all the kdc's are unavailable, or if the error was due to a
        user interrupt, fail */
 
-    if ((ret == KRB5_KDC_UNREACH) ||
-        (ret == KRB5_LIBOS_PWDINTR) ||
-        (ret == KRB5_REALM_CANT_RESOLVE))
+    if (ret == KRB5_KDC_UNREACH || ret == KRB5_REALM_CANT_RESOLVE ||
+        ret == KRB5_LIBOS_PWDINTR || ret == KRB5_LIBOS_CANTREADPWD)
         goto cleanup;
 
     /* if the reply did not come from the master kdc, try again with


More information about the cvs-krb5 mailing list