Skip Menu |
 

From: ghudson@mit.edu
Subject: git commit
Download (untitled) / with headers
text/plain 1.4KiB

Include file ccache name in error messages

When a FILE ccache method returns an error, append the filename to the
standard message for the code. Remove code to set extended messages
in helper functions as they would just be overwritten.

Also change the interpretation of errno values. Treat ENAMETOOLONG as
KRB5_FCC_NOFILE instead of KRB5_FCC_INTERNAL, since it has an external
cause and a name that long can't be opened by normal means. Treat
EROFS as KRB5_FCC_PERM. Treat ENOTDIR and ELOOP as KRB5_FCC_NOFILE
instead of KRB5_FCC_PERM as both errors imply that the full pathname
doesn't exist. Treat EBUSY and ETXTBSY as KRB5_CC_IO instead of
KRB5_FCC_PERM as they indicate a conflict rather than a permission
issue.

[ghudson@mit.edu: renamed set_error to set_errmsg_filename; removed
now-inoperative code to set extended messages in helper functions;
trimmed changes to interpret_errno; clarified and shortened commit
message]

https://github.com/krb5/krb5/commit/98b55e86d7ec8b0a3b9b9f9b415ffdf78f4fd2e8
Author: Nicolas Williams <nico@cryptonector.com>
Committer: Greg Hudson <ghudson@mit.edu>
Commit: 98b55e86d7ec8b0a3b9b9f9b415ffdf78f4fd2e8
Branch: master
src/lib/krb5/ccache/cc_file.c | 88 +++++++++++++++++----------------
src/tests/dejagnu/config/default.exp | 2 +-
src/tests/gssapi/t_client_keytab.py | 2 +-
src/tests/t_ccache.py | 4 +-
src/tests/t_errmsg.py | 14 +++---
5 files changed, 56 insertions(+), 54 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix bugs in previous cc_file.c changes

In fcc_destroy and krb5int_fcc_new_unique, call set_errmsg_filename
before deleting the cache handle, or else the reference to
data->filename is a use after free.

In set_errmsg_filename, do nothing if the code is 0, as we don't have
an error to annotate.

https://github.com/krb5/krb5/commit/14f039b40efd91b93b1148765bf0b7d3c90db58a
Author: Greg Hudson <ghudson@mit.edu>
Commit: 14f039b40efd91b93b1148765bf0b7d3c90db58a
Branch: master
src/lib/krb5/ccache/cc_file.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)