From bfd32c9e8f302d7722838a68572c6801f5640657 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 30 Aug 2013 11:31:23 -0400 Subject: krb5: Move determination of user being active The way a user is checked for being active does not depend on the ccache type so move that check out of the ccache specific functions. Resolves: https://fedorahosted.org/sssd/ticket/2061 --- src/providers/krb5/krb5_auth.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/providers/krb5/krb5_auth.c') diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index 976fdec0..178f18a3 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -76,7 +76,7 @@ check_old_ccache(const char *old_ccache, struct krb5child_req *kr, cc_template = dp_opt_get_cstring(kr->krb5_ctx->opts, KRB5_CCNAME_TMPL); ret = old_cc_ops->check_existing(old_ccache, kr->uid, realm, kr->upn, - cc_template, active, valid); + cc_template, valid); if (ret == ENOENT) { DEBUG(SSSDBG_TRACE_FUNC, ("Saved ccache %s doesn't exist.\n", old_ccache)); @@ -84,11 +84,17 @@ check_old_ccache(const char *old_ccache, struct krb5child_req *kr, } if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, - ("Cannot check if saved ccache %s is active and valid\n", + ("Cannot check if saved ccache %s is valid\n", old_ccache)); return ret; } + ret = check_if_uid_is_active(kr->uid, active); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, ("check_if_uid_is_active failed.\n")); + return ret; + } + return EOK; } -- cgit