URL: https://github.com/SSSD/sssd/pull/704
Author: jhrozek
 Title: #704: PROXY: Copy the response to the caller
Action: opened

PR body:
"""
Resolves: https://pagure.io/SSSD/sssd/issue/3892
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/704/head:pr704
git checkout pr704
From cc132194faef976a2599b545853e3455537d09c8 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Mon, 3 Dec 2018 23:26:46 +0100
Subject: [PATCH] PROXY: Copy the response to the caller

Resolves:
https://pagure.io/SSSD/sssd/issue/3892
---
 src/providers/proxy/proxy_auth.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c
index 3c5affeb5..926ce98f4 100644
--- a/src/providers/proxy/proxy_auth.c
+++ b/src/providers/proxy/proxy_auth.c
@@ -570,6 +570,7 @@ static struct tevent_req *proxy_pam_conv_send(TALLOC_CTX *mem_ctx,
 static void proxy_pam_conv_done(struct tevent_req *subreq)
 {
     struct pam_data *response;
+    struct response_data *resp;
     struct proxy_conv_ctx *state;
     struct tevent_req *req;
     errno_t ret;
@@ -583,8 +584,6 @@ static void proxy_pam_conv_done(struct tevent_req *subreq)
     /* Kill the child */
     kill(state->pid, SIGKILL);
 
-    // TODO copy response to pd
-
     if (ret != EOK) {
         DEBUG(SSSDBG_CRIT_FAILURE, "Unable to get reply from child [%d]: %s\n",
               ret, sss_strerror(ret));
@@ -593,6 +592,19 @@ static void proxy_pam_conv_done(struct tevent_req *subreq)
         return;
     }
 
+    state->pd->pam_status = response->pam_status;
+    state->pd->account_locked = response->account_locked;
+
+    for (resp = response->resp_list; resp != NULL; resp = resp->next) {
+        talloc_steal(state->pd, resp);
+
+        if (resp->next == NULL) {
+            resp->next = state->pd->resp_list;
+            state->pd->resp_list = response->resp_list;
+            break;
+        }
+    }
+
     DEBUG(SSSDBG_CONF_SETTINGS, "received: [%d][%s]\n",
           state->pd->pam_status,
           state->pd->domain);
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org

Reply via email to