Blame SOURCES/0085-ldap-implement-autofs-get-map.patch

8d3578
From fcb6f55c09d1d6f6487d771ac829e02565393c56 Mon Sep 17 00:00:00 2001
8d3578
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
8d3578
Date: Thu, 15 Aug 2019 12:42:05 +0200
8d3578
Subject: [PATCH 85/90] ldap: implement autofs get map
8d3578
MIME-Version: 1.0
8d3578
Content-Type: text/plain; charset=UTF-8
8d3578
Content-Transfer-Encoding: 8bit
8d3578
8d3578
This will obtain only the map object.
8d3578
8d3578
Resolves:
8d3578
https://pagure.io/SSSD/sssd/issue/2607
8d3578
8d3578
Reviewed-by: Tomáš Halman <thalman@redhat.com>
8d3578
---
8d3578
 src/providers/ipa/ipa_autofs.c                |   4 +
8d3578
 src/providers/ldap/ldap_common.h              |  11 +
8d3578
 src/providers/ldap/sdap_async_autofs.c        | 207 ++++++++++++++++++
8d3578
 src/providers/ldap/sdap_autofs.c              | 123 +++++++++--
8d3578
 src/providers/ldap/sdap_autofs.h              |   7 +
8d3578
 .../plugins/cache_req_autofs_map_by_name.c    |   2 +-
8d3578
 6 files changed, 340 insertions(+), 14 deletions(-)
8d3578
8d3578
diff --git a/src/providers/ipa/ipa_autofs.c b/src/providers/ipa/ipa_autofs.c
8d3578
index 50e30f39f..19d74071f 100644
8d3578
--- a/src/providers/ipa/ipa_autofs.c
8d3578
+++ b/src/providers/ipa/ipa_autofs.c
8d3578
@@ -51,5 +51,9 @@ errno_t ipa_autofs_init(TALLOC_CTX *mem_ctx,
8d3578
                   sdap_autofs_enumerate_handler_send, sdap_autofs_enumerate_handler_recv, id_ctx,
8d3578
                   struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
8d3578
 
8d3578
+    dp_set_method(dp_methods, DPM_AUTOFS_GET_MAP,
8d3578
+                  sdap_autofs_get_map_handler_send, sdap_autofs_get_map_handler_recv, id_ctx,
8d3578
+                  struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
8d3578
+
8d3578
     return ret;
8d3578
 }
8d3578
diff --git a/src/providers/ldap/ldap_common.h b/src/providers/ldap/ldap_common.h
8d3578
index 85dc6949c..36623aca8 100644
8d3578
--- a/src/providers/ldap/ldap_common.h
8d3578
+++ b/src/providers/ldap/ldap_common.h
8d3578
@@ -166,6 +166,17 @@ sdap_autofs_enumerate_handler_recv(TALLOC_CTX *mem_ctx,
8d3578
                                    struct tevent_req *req,
8d3578
                                    struct dp_reply_std *data);
8d3578
 
8d3578
+struct tevent_req *
8d3578
+sdap_autofs_get_map_handler_send(TALLOC_CTX *mem_ctx,
8d3578
+                                 struct sdap_id_ctx *id_ctx,
8d3578
+                                 struct dp_autofs_data *data,
8d3578
+                                 struct dp_req_params *params);
8d3578
+
8d3578
+errno_t
8d3578
+sdap_autofs_get_map_handler_recv(TALLOC_CTX *mem_ctx,
8d3578
+                                 struct tevent_req *req,
8d3578
+                                 struct dp_reply_std *data);
8d3578
+
8d3578
 int sdap_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
8d3578
                       const char *service_name, const char *dns_service_name,
8d3578
                       const char *urls, const char *backup_urls,
8d3578
diff --git a/src/providers/ldap/sdap_async_autofs.c b/src/providers/ldap/sdap_async_autofs.c
8d3578
index 7548d4a67..52ceb84ac 100644
8d3578
--- a/src/providers/ldap/sdap_async_autofs.c
8d3578
+++ b/src/providers/ldap/sdap_async_autofs.c
8d3578
@@ -28,6 +28,7 @@
8d3578
 #include "db/sysdb_autofs.h"
8d3578
 #include "providers/ldap/ldap_common.h"
8d3578
 #include "providers/ldap/sdap_autofs.h"
8d3578
+#include "providers/ldap/sdap_ops.h"
8d3578
 
8d3578
 enum autofs_map_op {
8d3578
     AUTOFS_MAP_OP_ADD,
8d3578
@@ -970,3 +971,209 @@ sdap_autofs_setautomntent_recv(struct tevent_req *req)
8d3578
     return EOK;
8d3578
 }
8d3578
 
8d3578
+struct sdap_autofs_get_map_state {
8d3578
+    struct sdap_id_ctx *id_ctx;
8d3578
+    struct sdap_options *opts;
8d3578
+    struct sdap_id_op *sdap_op;
8d3578
+    const char *mapname;
8d3578
+    int dp_error;
8d3578
+};
8d3578
+
8d3578
+static errno_t sdap_autofs_get_map_retry(struct tevent_req *req);
8d3578
+static void sdap_autofs_get_map_connect_done(struct tevent_req *subreq);
8d3578
+static void sdap_autofs_get_map_done(struct tevent_req *subreq);
8d3578
+
8d3578
+struct tevent_req *sdap_autofs_get_map_send(TALLOC_CTX *mem_ctx,
8d3578
+                                            struct sdap_id_ctx *id_ctx,
8d3578
+                                            const char *mapname)
8d3578
+{
8d3578
+    struct tevent_req *req;
8d3578
+    struct sdap_autofs_get_map_state *state;
8d3578
+    int ret;
8d3578
+
8d3578
+    req = tevent_req_create(mem_ctx, &state, struct sdap_autofs_get_map_state);
8d3578
+    if (!req) {
8d3578
+        return NULL;
8d3578
+    }
8d3578
+
8d3578
+    state->id_ctx = id_ctx;
8d3578
+    state->opts = id_ctx->opts;
8d3578
+    state->mapname = mapname;
8d3578
+    state->dp_error = DP_ERR_FATAL;
8d3578
+
8d3578
+    state->sdap_op = sdap_id_op_create(state, id_ctx->conn->conn_cache);
8d3578
+    if (!state->sdap_op) {
8d3578
+        DEBUG(SSSDBG_OP_FAILURE, "sdap_id_op_create() failed\n");
8d3578
+        ret = ENOMEM;
8d3578
+        goto done;
8d3578
+    }
8d3578
+
8d3578
+    ret = sdap_autofs_get_map_retry(req);
8d3578
+    if (ret == EAGAIN) {
8d3578
+        /* asynchronous processing */
8d3578
+        return req;
8d3578
+    }
8d3578
+
8d3578
+done:
8d3578
+    if (ret == EOK) {
8d3578
+        tevent_req_done(req);
8d3578
+    } else {
8d3578
+        tevent_req_error(req, ret);
8d3578
+    }
8d3578
+    tevent_req_post(req, id_ctx->be->ev);
8d3578
+
8d3578
+    return req;
8d3578
+}
8d3578
+
8d3578
+static errno_t sdap_autofs_get_map_retry(struct tevent_req *req)
8d3578
+{
8d3578
+    struct sdap_autofs_get_map_state *state;
8d3578
+    struct tevent_req *subreq;
8d3578
+    int ret;
8d3578
+
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_state);
8d3578
+
8d3578
+    subreq = sdap_id_op_connect_send(state->sdap_op, state, &ret;;
8d3578
+    if (subreq == NULL) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "sdap_id_op_connect_send() failed: "
8d3578
+                                   "%d(%s)\n", ret, strerror(ret));
8d3578
+        return ret;
8d3578
+    }
8d3578
+
8d3578
+    tevent_req_set_callback(subreq, sdap_autofs_get_map_connect_done, req);
8d3578
+
8d3578
+    return EAGAIN;
8d3578
+}
8d3578
+
8d3578
+static void sdap_autofs_get_map_connect_done(struct tevent_req *subreq)
8d3578
+{
8d3578
+    struct tevent_req *req;
8d3578
+    struct sdap_autofs_get_map_state *state;
8d3578
+    char *filter;
8d3578
+    char *safe_mapname;
8d3578
+    const char **attrs;
8d3578
+    int dp_error;
8d3578
+    int ret;
8d3578
+
8d3578
+    req = tevent_req_callback_data(subreq, struct tevent_req);
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_state);
8d3578
+
8d3578
+    ret = sdap_id_op_connect_recv(subreq, &dp_error);
8d3578
+    talloc_zfree(subreq);
8d3578
+
8d3578
+    if (ret != EOK) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "LDAP connection failed "
8d3578
+                                   "[%d]: %s\n", ret, strerror(ret));
8d3578
+        state->dp_error = dp_error;
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    DEBUG(SSSDBG_TRACE_FUNC, "LDAP connection successful\n");
8d3578
+
8d3578
+    ret = sss_filter_sanitize(state, state->mapname, &safe_mapname);
8d3578
+    if (ret != EOK) {
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))",
8d3578
+                 state->opts->autofs_mobject_map[SDAP_AT_AUTOFS_MAP_NAME].name,
8d3578
+                 safe_mapname,
8d3578
+                 state->opts->autofs_mobject_map[SDAP_OC_AUTOFS_MAP].name);
8d3578
+    if (filter == NULL) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build filter\n");
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    ret = build_attrs_from_map(state, state->opts->autofs_mobject_map,
8d3578
+                               SDAP_OPTS_AUTOFS_MAP, NULL, &attrs, NULL);
8d3578
+    if (ret != EOK) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build attributes from map\n");
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    subreq = sdap_search_bases_return_first_send(state, state->id_ctx->be->ev,
8d3578
+                    state->opts, sdap_id_op_handle(state->sdap_op),
8d3578
+                    state->opts->sdom->autofs_search_bases,
8d3578
+                    state->opts->autofs_mobject_map, false,
8d3578
+                    dp_opt_get_int(state->opts->basic, SDAP_SEARCH_TIMEOUT),
8d3578
+                    filter, attrs);
8d3578
+    if (subreq == NULL) {
8d3578
+        state->dp_error = DP_ERR_FATAL;
8d3578
+        tevent_req_error(req, ENOMEM);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    tevent_req_set_callback(subreq, sdap_autofs_get_map_done, req);
8d3578
+}
8d3578
+
8d3578
+static void sdap_autofs_get_map_done(struct tevent_req *subreq)
8d3578
+{
8d3578
+    struct tevent_req *req;
8d3578
+    struct sdap_autofs_get_map_state *state;
8d3578
+    struct sysdb_attrs **reply;
8d3578
+    size_t reply_count;
8d3578
+    errno_t ret;
8d3578
+
8d3578
+    req = tevent_req_callback_data(subreq, struct tevent_req);
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_state);
8d3578
+
8d3578
+    ret = sdap_search_bases_return_first_recv(subreq, state, &reply_count,
8d3578
+                                              &reply);
8d3578
+    talloc_zfree(subreq);
8d3578
+
8d3578
+    ret = sdap_id_op_done(state->sdap_op, ret, &state->dp_error);
8d3578
+    if (state->dp_error == DP_ERR_OK && ret != EOK) {
8d3578
+        /* retry */
8d3578
+        ret = sdap_autofs_get_map_retry(req);
8d3578
+        if (ret != EOK) {
8d3578
+            tevent_req_error(req, ret);
8d3578
+        }
8d3578
+        return;
8d3578
+    } else if (ret != EOK) {
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    if (reply_count == 0) {
8d3578
+        ret = sysdb_delete_autofsmap(state->id_ctx->be->domain, state->mapname);
8d3578
+        if (ret != EOK && ret != ENOENT) {
8d3578
+            DEBUG(SSSDBG_OP_FAILURE,
8d3578
+                "Cannot delete autofs map %s [%d]: %s\n",
8d3578
+                 state->mapname, ret, strerror(ret));
8d3578
+            tevent_req_error(req, ret);
8d3578
+            return;
8d3578
+        }
8d3578
+
8d3578
+        tevent_req_done(req);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    ret = save_autofs_map(state->id_ctx->be->domain, state->opts, reply[0], false);
8d3578
+    if (ret != EOK) {
8d3578
+        DEBUG(SSSDBG_OP_FAILURE,
8d3578
+             "Cannot save autofs map %s [%d]: %s\n",
8d3578
+              state->mapname, ret, strerror(ret));
8d3578
+        tevent_req_error(req, ret);
8d3578
+        return;
8d3578
+    }
8d3578
+
8d3578
+    tevent_req_done(req);
8d3578
+}
8d3578
+
8d3578
+errno_t sdap_autofs_get_map_recv(struct tevent_req *req,
8d3578
+                                 int *dp_error)
8d3578
+{
8d3578
+    struct sdap_autofs_get_map_state *state;
8d3578
+
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_state);
8d3578
+
8d3578
+    TEVENT_REQ_RETURN_ON_ERROR(req);
8d3578
+
8d3578
+    *dp_error = state->dp_error;
8d3578
+
8d3578
+    return EOK;
8d3578
+}
8d3578
diff --git a/src/providers/ldap/sdap_autofs.c b/src/providers/ldap/sdap_autofs.c
8d3578
index 5b9146199..9a5ed11e8 100644
8d3578
--- a/src/providers/ldap/sdap_autofs.c
8d3578
+++ b/src/providers/ldap/sdap_autofs.c
8d3578
@@ -34,6 +34,27 @@
8d3578
 #include "db/sysdb_autofs.h"
8d3578
 #include "util/util.h"
8d3578
 
8d3578
+static void
8d3578
+sdap_autofs_invalidate_maps(struct sdap_id_ctx *id_ctx,
8d3578
+                            const char *mapname)
8d3578
+{
8d3578
+    const char *master_map;
8d3578
+    errno_t ret;
8d3578
+
8d3578
+    master_map = dp_opt_get_string(id_ctx->opts->basic,
8d3578
+                                   SDAP_AUTOFS_MAP_MASTER_NAME);
8d3578
+    if (strcmp(master_map, mapname) == 0) {
8d3578
+        DEBUG(SSSDBG_FUNC_DATA, "Refresh of automount master map triggered: "
8d3578
+              "%s\n", mapname);
8d3578
+
8d3578
+        ret = sysdb_invalidate_autofs_maps(id_ctx->be->domain);
8d3578
+        if (ret != EOK) {
8d3578
+            DEBUG(SSSDBG_MINOR_FAILURE, "Could not invalidate autofs maps, "
8d3578
+                  "backend might return stale entries\n");
8d3578
+        }
8d3578
+    }
8d3578
+}
8d3578
+
8d3578
 struct sdap_autofs_enumerate_state {
8d3578
     struct tevent_context *ev;
8d3578
     struct sdap_id_ctx *ctx;
8d3578
@@ -216,7 +237,6 @@ sdap_autofs_enumerate_handler_send(TALLOC_CTX *mem_ctx,
8d3578
     struct sdap_autofs_enumerate_handler_state *state;
8d3578
     struct tevent_req *subreq;
8d3578
     struct tevent_req *req;
8d3578
-    const char *master_map;
8d3578
     errno_t ret;
8d3578
 
8d3578
     req = tevent_req_create(mem_ctx, &state, struct sdap_autofs_enumerate_handler_state);
8d3578
@@ -227,18 +247,7 @@ sdap_autofs_enumerate_handler_send(TALLOC_CTX *mem_ctx,
8d3578
 
8d3578
     DEBUG(SSSDBG_FUNC_DATA, "Requested refresh for: %s\n", data->mapname);
8d3578
 
8d3578
-    master_map = dp_opt_get_string(id_ctx->opts->basic,
8d3578
-                                   SDAP_AUTOFS_MAP_MASTER_NAME);
8d3578
-    if (strcmp(master_map, data->mapname) == 0) {
8d3578
-        DEBUG(SSSDBG_FUNC_DATA, "Refresh of automount master map triggered: "
8d3578
-              "%s\n", data->mapname);
8d3578
-
8d3578
-        ret = sysdb_invalidate_autofs_maps(id_ctx->be->domain);
8d3578
-        if (ret != EOK) {
8d3578
-            DEBUG(SSSDBG_MINOR_FAILURE, "Could not invalidate autofs maps, "
8d3578
-                  "backend might return stale entries\n");
8d3578
-        }
8d3578
-    }
8d3578
+    sdap_autofs_invalidate_maps(id_ctx, data->mapname);
8d3578
 
8d3578
     subreq = sdap_autofs_enumerate_send(mem_ctx, params->ev,
8d3578
                                         id_ctx, data->mapname);
8d3578
@@ -298,6 +307,90 @@ sdap_autofs_enumerate_handler_recv(TALLOC_CTX *mem_ctx,
8d3578
     return EOK;
8d3578
 }
8d3578
 
8d3578
+struct sdap_autofs_get_map_handler_state {
8d3578
+    struct dp_reply_std reply;
8d3578
+};
8d3578
+
8d3578
+static void sdap_autofs_get_map_handler_done(struct tevent_req *subreq);
8d3578
+
8d3578
+struct tevent_req *
8d3578
+sdap_autofs_get_map_handler_send(TALLOC_CTX *mem_ctx,
8d3578
+                                 struct sdap_id_ctx *id_ctx,
8d3578
+                                 struct dp_autofs_data *data,
8d3578
+                                 struct dp_req_params *params)
8d3578
+{
8d3578
+    struct sdap_autofs_get_map_handler_state *state;
8d3578
+    struct tevent_req *subreq;
8d3578
+    struct tevent_req *req;
8d3578
+    errno_t ret;
8d3578
+
8d3578
+    req = tevent_req_create(mem_ctx, &state,
8d3578
+                            struct sdap_autofs_get_map_handler_state);
8d3578
+    if (req == NULL) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "tevent_req_create() failed\n");
8d3578
+        return NULL;
8d3578
+    }
8d3578
+
8d3578
+    DEBUG(SSSDBG_FUNC_DATA, "Requested refresh for: %s\n", data->mapname);
8d3578
+
8d3578
+    sdap_autofs_invalidate_maps(id_ctx, data->mapname);
8d3578
+
8d3578
+    subreq = sdap_autofs_get_map_send(mem_ctx, id_ctx, data->mapname);
8d3578
+    if (subreq == NULL) {
8d3578
+        DEBUG(SSSDBG_CRIT_FAILURE, "Unable to send request for %s.\n",
8d3578
+              data->mapname);
8d3578
+        ret = ENOMEM;
8d3578
+        goto immediately;
8d3578
+    }
8d3578
+
8d3578
+    tevent_req_set_callback(subreq, sdap_autofs_get_map_handler_done, req);
8d3578
+
8d3578
+    return req;
8d3578
+
8d3578
+immediately:
8d3578
+    dp_reply_std_set(&state->reply, DP_ERR_DECIDE, ret, NULL);
8d3578
+
8d3578
+    /* TODO For backward compatibility we always return EOK to DP now. */
8d3578
+    tevent_req_done(req);
8d3578
+    tevent_req_post(req, params->ev);
8d3578
+
8d3578
+    return req;
8d3578
+}
8d3578
+
8d3578
+static void sdap_autofs_get_map_handler_done(struct tevent_req *subreq)
8d3578
+{
8d3578
+    struct sdap_autofs_get_map_handler_state *state;
8d3578
+    struct tevent_req *req;
8d3578
+    int dp_error;
8d3578
+    errno_t ret;
8d3578
+
8d3578
+    req = tevent_req_callback_data(subreq, struct tevent_req);
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_handler_state);
8d3578
+
8d3578
+    ret = sdap_autofs_get_map_recv(subreq, &dp_error);
8d3578
+    talloc_zfree(subreq);
8d3578
+
8d3578
+    /* TODO For backward compatibility we always return EOK to DP now. */
8d3578
+    dp_reply_std_set(&state->reply, dp_error, ret, NULL);
8d3578
+    tevent_req_done(req);
8d3578
+}
8d3578
+
8d3578
+errno_t
8d3578
+sdap_autofs_get_map_handler_recv(TALLOC_CTX *mem_ctx,
8d3578
+                                 struct tevent_req *req,
8d3578
+                                 struct dp_reply_std *data)
8d3578
+{
8d3578
+    struct sdap_autofs_get_map_handler_state *state = NULL;
8d3578
+
8d3578
+    state = tevent_req_data(req, struct sdap_autofs_get_map_handler_state);
8d3578
+
8d3578
+    TEVENT_REQ_RETURN_ON_ERROR(req);
8d3578
+
8d3578
+    *data = state->reply;
8d3578
+
8d3578
+    return EOK;
8d3578
+}
8d3578
+
8d3578
 errno_t sdap_autofs_init(TALLOC_CTX *mem_ctx,
8d3578
                          struct be_ctx *be_ctx,
8d3578
                          struct sdap_id_ctx *id_ctx,
8d3578
@@ -317,5 +410,9 @@ errno_t sdap_autofs_init(TALLOC_CTX *mem_ctx,
8d3578
                   sdap_autofs_enumerate_handler_send, sdap_autofs_enumerate_handler_recv, id_ctx,
8d3578
                   struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
8d3578
 
8d3578
+    dp_set_method(dp_methods, DPM_AUTOFS_GET_MAP,
8d3578
+                  sdap_autofs_get_map_handler_send, sdap_autofs_get_map_handler_recv, id_ctx,
8d3578
+                  struct sdap_id_ctx, struct dp_autofs_data, struct dp_reply_std);
8d3578
+
8d3578
     return EOK;
8d3578
 }
8d3578
diff --git a/src/providers/ldap/sdap_autofs.h b/src/providers/ldap/sdap_autofs.h
8d3578
index 593d8c94f..34b9ca953 100644
8d3578
--- a/src/providers/ldap/sdap_autofs.h
8d3578
+++ b/src/providers/ldap/sdap_autofs.h
8d3578
@@ -43,5 +43,12 @@ sdap_autofs_setautomntent_send(TALLOC_CTX *memctx,
8d3578
 errno_t
8d3578
 sdap_autofs_setautomntent_recv(struct tevent_req *req);
8d3578
 
8d3578
+struct tevent_req *sdap_autofs_get_map_send(TALLOC_CTX *mem_ctx,
8d3578
+                                            struct sdap_id_ctx *id_ctx,
8d3578
+                                            const char *mapname);
8d3578
+
8d3578
+errno_t sdap_autofs_get_map_recv(struct tevent_req *req,
8d3578
+                                 int *dp_error);
8d3578
+
8d3578
 #endif /* _SDAP_AUTOFS_H_ */
8d3578
 
8d3578
diff --git a/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c b/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
8d3578
index 268711678..4c1685728 100644
8d3578
--- a/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
8d3578
+++ b/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
8d3578
@@ -69,7 +69,7 @@ cache_req_autofs_map_by_name_dp_send(TALLOC_CTX *mem_ctx,
8d3578
                                      struct ldb_result *result)
8d3578
 {
8d3578
     return sss_dp_get_autofs_send(mem_ctx, cr->rctx, domain, true,
8d3578
-                                  SSS_DP_AUTOFS_ENUMERATE,
8d3578
+                                  SSS_DP_AUTOFS_GET_MAP,
8d3578
                                   data->name.name, NULL);
8d3578
 }
8d3578
 
8d3578
-- 
8d3578
2.20.1
8d3578