summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_interface.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-03-11 16:49:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:33 -0500
commit0d91334fe799f6b50a8265f9dc097411c3a29e18 (patch)
treec86395688b41edd01055a2a75ac0ba7f6113ad18 /source3/passdb/pdb_interface.c
parent5214cb6782b1ac01b4b23d53478fa11ad00915fe (diff)
downloadsamba-0d91334fe799f6b50a8265f9dc097411c3a29e18.tar.gz
samba-0d91334fe799f6b50a8265f9dc097411c3a29e18.tar.bz2
samba-0d91334fe799f6b50a8265f9dc097411c3a29e18.zip
r21784: Replace smb_register_idle_event() with event_add_timed(). This fixes winbind
who did not run the idle events to drop ldap connections. Volker (This used to be commit af3308ce5a21220ff4c510de356dbaa6cf9ff997)
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-rw-r--r--source3/passdb/pdb_interface.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index ce8b46eb0f..976dfc1d08 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -94,6 +94,23 @@ struct pdb_init_function_entry *pdb_find_backend_entry(const char *name)
return NULL;
}
+/*
+ * The event context for the passdb backend. I know this is a bad hack and yet
+ * another static variable, but our pdb API is a global thing per
+ * definition. The first use for this is the LDAP idle function, more might be
+ * added later.
+ *
+ * I don't feel too bad about this static variable, it replaces the
+ * smb_idle_event_list that used to exist in lib/module.c. -- VL
+ */
+
+static struct event_context *pdb_event_ctx;
+
+struct event_context *pdb_get_event_context(void)
+{
+ return pdb_event_ctx;
+}
+
/******************************************************************
Make a pdb_methods from scratch
*******************************************************************/
@@ -1116,8 +1133,9 @@ BOOL pdb_new_rid(uint32 *rid)
If uninitialised, context will auto-init on first use.
***************************************************************/
-BOOL initialize_password_db(BOOL reload)
-{
+BOOL initialize_password_db(BOOL reload, struct event_context *event_ctx)
+{
+ pdb_event_ctx = event_ctx;
return (pdb_get_methods_reload(reload) != NULL);
}