From 48dd01f29b893a958a64dcf6eb0b734e8463425b Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 7 Oct 2013 09:51:56 -0400 Subject: 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 --- src/lib/gssapi/krb5/import_cred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/gssapi/krb5/import_cred.c b/src/lib/gssapi/krb5/import_cred.c index 973b9d015..f0a0373bf 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); -- cgit