From: Ken Raeburn Date: Wed, 4 Jul 2007 01:49:17 +0000 (+0000) Subject: Save a detailed message for FCC_NOFILE including the file name X-Git-Tag: krb5-1.7-alpha1~1032 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=934a694a051776eae565aa69ba2aea0dd6608c27;p=krb5.git Save a detailed message for FCC_NOFILE including the file name git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19663 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c index 285832331..fc9094b6e 100644 --- a/src/lib/krb5/ccache/cc_file.c +++ b/src/lib/krb5/ccache/cc_file.c @@ -1240,8 +1240,19 @@ krb5_fcc_open_file (krb5_context context, krb5_ccache id, int mode) } f = THREEPARAMOPEN (data->filename, open_flag | O_BINARY, 0600); - if (f == NO_FILE) - return krb5_fcc_interpret (context, errno); + if (f == NO_FILE) { + switch (errno) { + case ENOENT: + retval = KRB5_FCC_NOFILE; + fprintf(stderr, "stuffing error message in context %p\n", context); + krb5_set_error_message(context, retval, + "Credentials cache file '%s' not found", + data->filename); + return retval; + default: + return krb5_fcc_interpret (context, errno); + } + } data->mode = mode;