From f0f69b9cc572c835b44e4ee0105f51c019216393 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Mon, 4 Nov 2019 16:50:16 +0100
Subject: [PATCH] ipa: use the right context for autofs

Related to https://pagure.io/SSSD/sssd/issue/4111

(cherry picked with changes from commit 9ba136ce27308e8b0b8ec921c135433da8569531)
---
 src/providers/ipa/ipa_autofs.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/providers/ipa/ipa_autofs.c b/src/providers/ipa/ipa_autofs.c
index 5f72d60cd3..144d127814 100644
--- a/src/providers/ipa/ipa_autofs.c
+++ b/src/providers/ipa/ipa_autofs.c
@@ -48,16 +48,22 @@ errno_t ipa_autofs_init(TALLOC_CTX *mem_ctx,
     }
 
     dp_set_method(dp_methods, DPM_AUTOFS_ENUMERATE,
-                  sdap_autofs_enumerate_handler_send, sdap_autofs_enumerate_handler_recv, id_ctx,
-                  struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
+                  sdap_autofs_enumerate_handler_send,
+                  sdap_autofs_enumerate_handler_recv,
+                  id_ctx->sdap_id_ctx, struct sdap_id_ctx,
+                  struct dp_autofs_data, struct dp_reply_std);
 
     dp_set_method(dp_methods, DPM_AUTOFS_GET_MAP,
-                  sdap_autofs_get_map_handler_send, sdap_autofs_get_map_handler_recv, id_ctx,
-                  struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
+                  sdap_autofs_get_map_handler_send,
+                  sdap_autofs_get_map_handler_recv,
+                  id_ctx->sdap_id_ctx, struct sdap_id_ctx,
+                  struct dp_autofs_data, struct dp_reply_std);
 
     dp_set_method(dp_methods, DPM_AUTOFS_GET_ENTRY,
-                  sdap_autofs_get_entry_handler_send, sdap_autofs_get_entry_handler_recv, id_ctx,
-                  struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
+                  sdap_autofs_get_entry_handler_send,
+                  sdap_autofs_get_entry_handler_recv,
+                  id_ctx->sdap_id_ctx, struct sdap_id_ctx,
+                  struct dp_autofs_data, struct dp_reply_std);
 
     return ret;
 }
