In our responders we have a feature that allows to avoid dispatching multiple identical requests at the same time. This is done by queing additional identical requests in a special hash table and then replying to all clients at the same time when a response is received.
When the connection to a provider breaks all these waiting requests need to be cleaned out and the has table emptied. This was not happening in sssd_pam, so if a connection to the provider was lost client request would pile up and never be replied again. The attached patch fixes this issue. Tested using kill -STOP of the sssd_be process and trying to authenticate via the gnome screensaver. Fixes: https://fedorahosted.org/sssd/ticket/1655 -- Simo Sorce * Red Hat, Inc * New York
>From 68f9ef840ada24f727aaea9c15cd1453b6d25644 Mon Sep 17 00:00:00 2001 From: Simo Sorce <[email protected]> Date: Thu, 13 Dec 2012 18:13:06 -0500 Subject: [PATCH] sssd_pam: Cleanup requests cache on sbus reconect The pam responder was not properly configured to recover from a backend disconnect. The connections that were in flight before the disconnection were never freed and new requests for the same user would just pile up on top of the now phantom requests. Fixes: https://fedorahosted.org/sssd/ticket/1655 --- src/responder/pam/pamsrv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c index c608f5814c440e2bbebc20ea35e9c8d706bfec1e..f877c4f0236e18f6e778bd42c7b39832c609e48f 100644 --- a/src/responder/pam/pamsrv.c +++ b/src/responder/pam/pamsrv.c @@ -91,7 +91,10 @@ static void pam_dp_reconnect_init(struct sbus_connection *conn, int status, void DATA_PROVIDER_VERSION, "PAM"); /* all fine */ - if (ret == EOK) return; + if (ret == EOK) { + handle_requests_after_reconnect(be_conn->rctx); + return; + } } /* Handle failure */ -- 1.8.0.1
_______________________________________________ sssd-devel mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
