]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't fall back to master on password read error 424/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 14 Mar 2016 15:06:49 +0000 (11:06 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 8 Apr 2016 21:01:10 +0000 (17:01 -0400)
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

index e95673fe47378e73b9230626e4f41df42892e844..55aa9d6e883ad5460fe2bbb0b9c7e7cdbdb91e20 100644 (file)
@@ -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