summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-04-22 13:59:57 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-03 14:09:13 -0400
commitd0a10e530823d6d8eff31ef164eee9ba2fb71c63 (patch)
tree2af05573093aba810b5e1a77c5f97677c8475b9c /src
parent13c88d62a09c152983abc99d989bb077fa987acb (diff)
downloadsssd-d0a10e530823d6d8eff31ef164eee9ba2fb71c63.tar.gz
sssd-d0a10e530823d6d8eff31ef164eee9ba2fb71c63.tar.xz
sssd-d0a10e530823d6d8eff31ef164eee9ba2fb71c63.zip
LDAP: Initialize ID mapping when configured
Diffstat (limited to 'src')
-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 f55e94b74..92c966b17 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 71ae246d0..d72a0edd9 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;