From: Tom Yu Date: Thu, 29 Nov 2007 00:53:32 +0000 (+0000) Subject: pull up r20111 from trunk X-Git-Tag: krb5-1.6.4-beta1~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2cd91d5ee67731771edc929915ac26ef57746a34;p=krb5.git pull up r20111 from trunk r20111@cathode-dark-space: raeburn | 2007-10-10 14:27:37 -0400 ticket: 5777 Add enhanced error messages to new error return cases, explaining the (fairly generic) errors codes. ticket: 5777 version_fixed: 1.6.4 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@20171 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/keytab/kt_file.c b/src/lib/krb5/keytab/kt_file.c index 93c9c8ba2..f9550dd91 100644 --- a/src/lib/krb5/keytab/kt_file.c +++ b/src/lib/krb5/keytab/kt_file.c @@ -486,6 +486,8 @@ krb5_ktfile_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor * /* Wrapped?! */ KTITERS(id)--; KTUNLOCK(id); + krb5_set_error_message(context, KRB5_KT_IOERR, + "Too many keytab iterators active"); return KRB5_KT_IOERR; /* XXX */ } KTUNLOCK(id); @@ -884,6 +886,8 @@ krb5_ktfile_add(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry) if (KTFILEP(id)) { /* Iterator(s) active -- no changes. */ KTUNLOCK(id); + krb5_set_error_message(context, KRB5_KT_IOERR, + "Cannot change keytab with keytab iterators active"); return KRB5_KT_IOERR; /* XXX */ } if ((retval = krb5_ktfileint_openw(context, id))) { @@ -917,6 +921,8 @@ krb5_ktfile_remove(krb5_context context, krb5_keytab id, krb5_keytab_entry *entr if (KTFILEP(id)) { /* Iterator(s) active -- no changes. */ KTUNLOCK(id); + krb5_set_error_message(context, KRB5_KT_IOERR, + "Cannot change keytab with keytab iterators active"); return KRB5_KT_IOERR; /* XXX */ }