summaryrefslogtreecommitdiffstats
path: root/src/plug-sch.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2013-07-23 21:08:56 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2013-07-26 16:10:05 +0300
commitd862fc6fc65f1fb5ff0582e3561a7ab988af9432 (patch)
treea175494a22ae321ea89c410afb53d79d14d9f375 /src/plug-sch.c
parent633c4c92b73efeb3d660b70480108b0db41fa3bd (diff)
downloadslapi-nis-freeipa-nss-compat.tar.gz
slapi-nis-freeipa-nss-compat.tar.xz
slapi-nis-freeipa-nss-compat.zip
WIP compat plugin: solve deadlock when looking up SSSD usersfreeipa-nss-compat
Diffstat (limited to 'src/plug-sch.c')
-rw-r--r--src/plug-sch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plug-sch.c b/src/plug-sch.c
index 5440e00..5d74beb 100644
--- a/src/plug-sch.c
+++ b/src/plug-sch.c
@@ -108,6 +108,7 @@ plugin_startup(Slapi_PBlock *pb)
state->plugin_base ? "\"" : "");
/* Populate the tree of fake entries. */
backend_startup(pb, state);
+ state->pam_lock = wrap_new_rwlock();
/* Note that the plugin is ready to go. */
slapi_log_error(SLAPI_LOG_PLUGIN, plugin_description.spd_id,
"plugin startup completed\n");
@@ -120,6 +121,8 @@ plugin_shutdown(Slapi_PBlock *pb)
struct plugin_state *state;
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &state);
map_done(state);
+ wrap_free_rwlock(state->pam_lock);
+ state->pam_lock = NULL;
state->plugin_base = NULL;
slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id,
"plugin shutdown completed\n");