summaryrefslogtreecommitdiff
path: root/src/providers/krb5/krb5_auth.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-08-30 11:31:23 -0400
committerSimo Sorce <simo@redhat.com>2013-09-09 15:11:45 -0400
commitbfd32c9e8f302d7722838a68572c6801f5640657 (patch)
tree53fa628e46580536f728d3d9b5458e853a4dbb5e /src/providers/krb5/krb5_auth.c
parent1536e39c191a013bc50bb6fd4b8eaef11cf0d436 (diff)
downloadsssd-bfd32c9e8f302d7722838a68572c6801f5640657.tar.gz
sssd-bfd32c9e8f302d7722838a68572c6801f5640657.tar.bz2
sssd-bfd32c9e8f302d7722838a68572c6801f5640657.zip
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
Diffstat (limited to 'src/providers/krb5/krb5_auth.c')
-rw-r--r--src/providers/krb5/krb5_auth.c10
1 files changed, 8 insertions, 2 deletions
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;
}