diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-27 11:41:19 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-29 11:40:03 -0400 |
commit | e48780b854ac32b0fe35b607446d733486765fbe (patch) | |
tree | a635be78fc0c89473b90fbce26fc280f97466620 | |
parent | 1821a0d507d5aadf725d4af4757819119c91cc68 (diff) | |
download | sssd-e48780b854ac32b0fe35b607446d733486765fbe.tar.gz sssd-e48780b854ac32b0fe35b607446d733486765fbe.tar.bz2 sssd-e48780b854ac32b0fe35b607446d733486765fbe.zip |
KRB5: Initialize the credential cache type properly
We weren't guaranteeing that the cctype-specific callbacks were
initialized before using them.
This bug only presented itself for users who were logging in
without a ccacheFile attribute in the LDB (for example, first-time
logins).
-rw-r--r-- | src/providers/krb5/krb5_auth.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index 9b503f47..e931da96 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -605,6 +605,17 @@ static void krb5_find_ccache_step(struct tevent_req *req) goto done; } + if (!kr->cc_be) { + kr->cc_be = get_cc_be_ops_ccache(kr->ccname); + if (kr->cc_be == NULL) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("Cannot get operations on new ccache %s\n", + kr->ccname)); + ret = EINVAL; + goto done; + } + } + ret = kr->cc_be->create(kr->ccname, kr->krb5_ctx->illegal_path_re, kr->uid, kr->gid, private_path); |