summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/ldap_init.c7
-rw-r--r--src/providers/ldap/sdap.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index f55e94b7..92c966b1 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -28,6 +28,7 @@
#include "providers/ldap/sdap_access.h"
#include "providers/ldap/sdap_sudo.h"
#include "providers/ldap/sdap_autofs.h"
+#include "providers/ldap/sdap_idmap.h"
static void sdap_shutdown(struct be_req *req);
@@ -153,6 +154,12 @@ int sssm_ldap_id_init(struct be_ctx *bectx,
goto done;
}
+ if (dp_opt_get_bool(ctx->opts->basic, SDAP_ID_MAPPING)) {
+ /* Set up the ID mapping object */
+ ret = sdap_idmap_init(ctx, ctx, &ctx->opts->idmap_ctx);
+ if (ret != EOK) goto done;
+ }
+
ret = sdap_id_setup_tasks(ctx);
if (ret != EOK) {
goto done;
diff --git a/src/providers/ldap/sdap.h b/src/providers/ldap/sdap.h
index 71ae246d..d72a0edd 100644
--- a/src/providers/ldap/sdap.h
+++ b/src/providers/ldap/sdap.h
@@ -357,6 +357,9 @@ struct sdap_options {
struct sdap_attr_map *netgroup_map;
struct sdap_attr_map *service_map;
+ /* ID-mapping support */
+ struct sdap_idmap_ctx *idmap_ctx;
+
/* FIXME - should this go to a special struct to avoid mixing with name-service-switch maps? */
struct sdap_attr_map *sudorule_map;
struct sdap_attr_map *autofs_mobject_map;