diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-10-07 09:51:56 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-10-14 23:32:05 -0400 |
commit | 48dd01f29b893a958a64dcf6eb0b734e8463425b (patch) | |
tree | d640110f683fb152d3e5ca6290b68ad7f486f8b9 /src/lib | |
parent | 69c190ed9189273a79fdb8e8d95ce970d21118b3 (diff) | |
download | krb5-48dd01f29b893a958a64dcf6eb0b734e8463425b.tar.gz krb5-48dd01f29b893a958a64dcf6eb0b734e8463425b.tar.xz krb5-48dd01f29b893a958a64dcf6eb0b734e8463425b.zip |
Fix GSSAPI krb5 cred ccache import
json_to_ccache was incorrectly indexing the JSON array when restoring
a memory ccache. Fix it.
Add test coverage for a multi-cred ccache by exporting/importing the
synthesized S4U2Proxy delegated cred in t_s4u2proxy_krb5.c; move
export_import_cred from t_export_cred.c to common.c to facilitate
this. Make a note in t_export_cred.py that this case is covered in
t_s4u.py.
ticket: 7706
target_version: 1.11.4
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/gssapi/krb5/import_cred.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gssapi/krb5/import_cred.c b/src/lib/gssapi/krb5/import_cred.c index 973b9d0152..f0a0373bfb 100644 --- a/src/lib/gssapi/krb5/import_cred.c +++ b/src/lib/gssapi/krb5/import_cred.c @@ -486,7 +486,7 @@ json_to_ccache(krb5_context context, k5_json_value v, krb5_ccache *ccache_out, /* Add remaining array entries to the ccache as credentials. */ for (i = 1; i < len; i++) { - if (json_to_creds(context, k5_json_array_get(array, 1), &creds)) + if (json_to_creds(context, k5_json_array_get(array, i), &creds)) goto invalid; ret = krb5_cc_store_cred(context, ccache, &creds); krb5_free_cred_contents(context, &creds); |