5670e1eed5
Copy from network/krb5 based on submit request 28402 from user coolo OBS-URL: https://build.opensuse.org/request/show/28402 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/krb5?expand=0&rev=45
25 lines
925 B
Plaintext
25 lines
925 B
Plaintext
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.
|
|
|
|
Index: krb5-1.7/src/clients/kinit/kinit.c
|
|
===================================================================
|
|
--- krb5-1.7.orig/src/clients/kinit/kinit.c
|
|
+++ krb5-1.7/src/clients/kinit/kinit.c
|
|
@@ -670,8 +670,14 @@ k5_kinit(opts, k5)
|
|
code = krb5_cc_initialize(k5->ctx, k5->cc,
|
|
opts->canonicalize ? my_creds.client : k5->me);
|
|
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;
|
|
}
|
|
|