summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_delayed_online_authentication.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/krb5/krb5_delayed_online_authentication.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/krb5/krb5_delayed_online_authentication.c')
-rw-r--r--src/providers/krb5/krb5_delayed_online_authentication.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/providers/krb5/krb5_delayed_online_authentication.c b/src/providers/krb5/krb5_delayed_online_authentication.c
index 5f13eac8e..bf2ef7755 100644
--- a/src/providers/krb5/krb5_delayed_online_authentication.c
+++ b/src/providers/krb5/krb5_delayed_online_authentication.c
@@ -103,8 +103,8 @@ static void authenticate_user(struct tevent_context *ev,
}
#endif
- req = krb5_auth_send(auth_data, ev, auth_data->be_ctx, auth_data->pd,
- auth_data->krb5_ctx);
+ req = krb5_auth_queue_send(auth_data, ev, auth_data->be_ctx,
+ auth_data->pd, auth_data->krb5_ctx);
if (req == NULL) {
DEBUG(SSSDBG_CRIT_FAILURE, "krb5_auth_send failed.\n");
talloc_free(auth_data);
@@ -114,14 +114,15 @@ static void authenticate_user(struct tevent_context *ev,
tevent_req_set_callback(req, authenticate_user_done, auth_data);
}
-static void authenticate_user_done(struct tevent_req *req) {
+static void authenticate_user_done(struct tevent_req *req)
+{
struct auth_data *auth_data = tevent_req_callback_data(req,
struct auth_data);
int ret;
int pam_status = PAM_SYSTEM_ERR;
- int dp_err;
+ int dp_err = DP_ERR_OK;
- ret = krb5_auth_recv(req, &pam_status, &dp_err);
+ ret = krb5_auth_queue_recv(req, &pam_status, &dp_err);
talloc_free(req);
if (ret) {
DEBUG(SSSDBG_CRIT_FAILURE, "krb5_auth request failed.\n");