1 If the error message is going to be ambiguous, try to give the user some clue
2 by returning the last error reported by the OS.
4 --- krb5-1.16/src/clients/kinit/kinit.c.orig 2018-04-02 19:53:38.218343400 +0200
5 +++ krb5-1.16/src/clients/kinit/kinit.c 2018-04-02 19:59:46.085005866 +0200
7 ret = krb5_cc_initialize(k5->ctx, k5->out_cc, opts->canonicalize ?
8 my_creds.client : k5->me);
10 + if ((ret == KRB5_CC_IO) && (errno != 0)) {
11 + com_err(progname, ret, "when initializing cache %s: %s",
12 + opts->k5_out_cache_name ? opts->k5_out_cache_name : "",
15 com_err(progname, ret, _("when initializing cache %s"),
16 opts->k5_out_cache_name ? opts->k5_out_cache_name : "");
21 fprintf(stderr, _("Initialized cache\n"));