svn rev #24448: trunk/src/lib/krb5/keytab/
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon Oct 11 12:43:42 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24448
Commit By: ghudson
Log Message:
When returning KRB5_KT_NOTFOUND from krb5_ktfile_get_entry, set an
extended error message indicating which principal was not found.
Changed Files:
U trunk/src/lib/krb5/keytab/kt_file.c
Modified: trunk/src/lib/krb5/keytab/kt_file.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_file.c 2010-10-09 11:46:53 UTC (rev 24447)
+++ trunk/src/lib/krb5/keytab/kt_file.c 2010-10-11 16:43:42 UTC (rev 24448)
@@ -253,6 +253,7 @@
krb5_boolean similar;
int kvno_offset = 0;
int was_open;
+ char *princname;
kerror = KTLOCK(id);
if (kerror)
@@ -375,8 +376,14 @@
kerror = 0;
else if (found_wrong_kvno)
kerror = KRB5_KT_KVNONOTFOUND;
- else
+ else {
kerror = KRB5_KT_NOTFOUND;
+ if (krb5_unparse_name(context, principal, &princname) == 0) {
+ krb5_set_error_message(context, kerror, "No key table entry "
+ "found for %s", princname);
+ free(princname);
+ }
+ }
}
if (kerror) {
if (was_open == 0)
More information about the cvs-krb5
mailing list