2007-10-25 02:08:58 +02:00
|
|
|
If the error message is going to be ambiguous, try to give the user some clue
|
|
|
|
by returning the last error reported by the OS.
|
|
|
|
|
2009-07-08 19:41:43 +02:00
|
|
|
Index: trunk/src/clients/kinit/kinit.c
|
2007-10-25 02:08:58 +02:00
|
|
|
===================================================================
|
2009-07-08 19:41:43 +02:00
|
|
|
--- trunk.orig/src/clients/kinit/kinit.c
|
|
|
|
+++ trunk/src/clients/kinit/kinit.c
|
|
|
|
@@ -658,8 +658,14 @@ k5_kinit(opts, k5)
|
|
|
|
code = krb5_cc_initialize(k5->ctx, k5->cc,
|
|
|
|
opts->canonicalize ? my_creds.client : k5->me);
|
2007-10-25 02:08:58 +02:00
|
|
|
if (code) {
|
|
|
|
- com_err(progname, code, "when initializing cache %s",
|
|
|
|
- opts->k5_cache_name?opts->k5_cache_name:"");
|
|
|
|
+ if ((code == KRB5_CC_IO) && (errno != 0)) {
|
|
|
|
+ com_err(progname, code, "when initializing cache %s: %s",
|
|
|
|
+ opts->k5_cache_name?opts->k5_cache_name:"",
|
|
|
|
+ strerror(errno));
|
|
|
|
+ } else {
|
|
|
|
+ com_err(progname, code, "when initializing cache %s",
|
|
|
|
+ opts->k5_cache_name?opts->k5_cache_name:"");
|
|
|
|
+ }
|
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|