summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder/nss/nsssrv.c')
-rw-r--r--src/responder/nss/nsssrv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index 709912c21..ee8fecb01 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -391,6 +391,16 @@ static void nss_dp_reconnect_init(struct sbus_connection *conn,
/* nss_shutdown(rctx); */
}
+static void *idmap_talloc(size_t size, void *pvt)
+{
+ return talloc_size(pvt, size);
+}
+
+static void idmap_free(void *ptr, void *pvt)
+{
+ talloc_free(ptr);
+}
+
int nss_process_init(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct confdb_ctx *cdb)
@@ -401,6 +411,7 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
struct nss_ctx *nctx;
int memcache_timeout;
int ret, max_retries;
+ enum idmap_error_code err;
int hret;
int fd_limit;
@@ -457,6 +468,14 @@ int nss_process_init(TALLOC_CTX *mem_ctx,
nss_dp_reconnect_init, iter);
}
+ err = sss_idmap_init(idmap_talloc, nctx, idmap_free,
+ &nctx->idmap_ctx);
+ if (err != IDMAP_SUCCESS) {
+ DEBUG(SSSDBG_FATAL_FAILURE, ("sss_idmap_init failed.\n"));
+ ret = EFAULT;
+ goto fail;
+ }
+
/* Create the lookup table for netgroup results */
hret = sss_hash_create(nctx, 10, &nctx->netgroups);
if (hret != HASH_SUCCESS) {