summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_auth.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-06-30 19:40:46 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-07-06 15:23:44 +0200
commit01ec08efd0e166ac6f390f8627c6d08dcc63ccc4 (patch)
tree5a95a8a7b36db9baaf18fad0ca0c22eb7a2cc32d /src/providers/ipa/ipa_auth.c
parenteca74a9559ce1b0f123c14906ad8394fc303f468 (diff)
downloadsssd-01ec08efd0e166ac6f390f8627c6d08dcc63ccc4.tar.gz
sssd-01ec08efd0e166ac6f390f8627c6d08dcc63ccc4.tar.xz
sssd-01ec08efd0e166ac6f390f8627c6d08dcc63ccc4.zip
KRB5: Add and use krb5_auth_queue_send to queue requests by default
Resolves: https://fedorahosted.org/sssd/ticket/2701 Previously, only the krb5 provides used to queue requests, which resulted in concurrent authentication requests stepping on one another. This patch queues requests by default. Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/providers/ipa/ipa_auth.c')
-rw-r--r--src/providers/ipa/ipa_auth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/providers/ipa/ipa_auth.c b/src/providers/ipa/ipa_auth.c
index 79e891b77..b1bfa3ffe 100644
--- a/src/providers/ipa/ipa_auth.c
+++ b/src/providers/ipa/ipa_auth.c
@@ -224,8 +224,8 @@ void ipa_auth(struct be_req *be_req)
goto fail;
}
- req = krb5_auth_send(state, state->ev, be_ctx, state->pd,
- state->ipa_auth_ctx->krb5_auth_ctx);
+ req = krb5_auth_queue_send(state, state->ev, be_ctx, state->pd,
+ state->ipa_auth_ctx->krb5_auth_ctx);
if (req == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "krb5_auth_send failed.\n");
goto fail;
@@ -248,7 +248,7 @@ static void ipa_auth_handler_done(struct tevent_req *req)
int pam_status = PAM_SYSTEM_ERR;
int dp_err;
- ret = krb5_auth_recv(req, &pam_status, &dp_err);
+ ret = krb5_auth_queue_recv(req, &pam_status, &dp_err);
talloc_zfree(req);
state->pd->pam_status = pam_status;
if (ret != EOK && pam_status != PAM_CRED_ERR) {
@@ -423,8 +423,8 @@ static void ipa_auth_ldap_done(struct tevent_req *req)
DEBUG(SSSDBG_TRACE_FUNC, "LDAP authentication succeded, "
"trying Kerberos authentication again.\n");
- req = krb5_auth_send(state, state->ev, be_ctx, state->pd,
- state->ipa_auth_ctx->krb5_auth_ctx);
+ req = krb5_auth_queue_send(state, state->ev, be_ctx, state->pd,
+ state->ipa_auth_ctx->krb5_auth_ctx);
if (req == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "krb5_auth_send failed.\n");
goto done;
@@ -445,7 +445,7 @@ static void ipa_auth_handler_retry_done(struct tevent_req *req)
int pam_status;
int dp_err;
- ret = krb5_auth_recv(req, &pam_status, &dp_err);
+ ret = krb5_auth_queue_recv(req, &pam_status, &dp_err);
talloc_zfree(req);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, "krb5_auth_recv request failed.\n");