diff options
author | Ken Raeburn <raeburn@mit.edu> | 2007-10-10 18:27:37 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2007-10-10 18:27:37 +0000 |
commit | c2bff88257c8076f5a6ed15712863acc7eea3724 (patch) | |
tree | 3229af417b8103c9c894a0db115d2af8590a5cbc /src | |
parent | 6a44c444ce9bbc1083195915877c80a897300167 (diff) | |
download | krb5-c2bff88257c8076f5a6ed15712863acc7eea3724.zip krb5-c2bff88257c8076f5a6ed15712863acc7eea3724.tar.gz krb5-c2bff88257c8076f5a6ed15712863acc7eea3724.tar.bz2 |
Add enhanced error messages to new error return cases, explaining the
(fairly generic) errors codes.
ticket: 5777
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20111 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/krb5/keytab/kt_file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/krb5/keytab/kt_file.c b/src/lib/krb5/keytab/kt_file.c index 4be2cc6..e6e04e3 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); @@ -883,6 +885,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))) { @@ -916,6 +920,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 */ } |