s3-passdb: use tevent_context in passdb.
authorGünther Deschner <gd@samba.org>
Thu, 27 Oct 2011 14:28:27 +0000 (16:28 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 28 Oct 2011 11:09:47 +0000 (13:09 +0200)
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104

source3/include/passdb.h
source3/passdb/pdb_interface.c
source3/passdb/pdb_ldap.c

index 70b21c9b042c2fb6c9f8bcadd56a9d3434af4c93..37d35cfee3d5adb9e369773ed0bc8624280d14a5 100644 (file)
@@ -32,6 +32,7 @@
 #endif
 
 #include "../librpc/gen_ndr/lsa.h"
+#include <tevent.h>
 
 /* group mapping headers */
 
@@ -801,7 +802,7 @@ bool pdb_element_is_set_or_changed(const struct samu *sampass,
 NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) ;
 struct pdb_init_function_entry *pdb_find_backend_entry(const char *name);
 const struct pdb_init_function_entry *pdb_get_backends(void);
-struct event_context *pdb_get_event_context(void);
+struct tevent_context *pdb_get_tevent_context(void);
 NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected);
 struct pdb_domain_info *pdb_get_domain_info(TALLOC_CTX *mem_ctx);
 bool pdb_getsampwnam(struct samu *sam_acct, const char *username) ;
@@ -872,7 +873,7 @@ bool pdb_sid_to_id(const struct dom_sid *sid, uid_t *uid, gid_t *gid,
                   enum lsa_SidType *type);
 uint32_t pdb_capabilities(void);
 bool pdb_new_rid(uint32_t *rid);
-bool initialize_password_db(bool reload, struct event_context *event_ctx);
+bool initialize_password_db(bool reload, struct tevent_context *tevent_ctx);
 struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
                                   enum pdb_search_type type);
 struct pdb_search *pdb_search_users(TALLOC_CTX *mem_ctx, uint32_t acct_flags);
index a6a777436ec18e7637a74893890ee17f3deadb0e..b202d43a5be44b706c05d982ddc7f46a197554fd 100644 (file)
@@ -116,11 +116,11 @@ const struct pdb_init_function_entry *pdb_get_backends(void)
  * smb_idle_event_list that used to exist in lib/module.c.  -- VL
  */
 
-static struct event_context *pdb_event_ctx;
+static struct tevent_context *pdb_tevent_ctx;
 
-struct event_context *pdb_get_event_context(void)
+struct tevent_context *pdb_get_tevent_context(void)
 {
-       return pdb_event_ctx;
+       return pdb_tevent_ctx;
 }
 
 /******************************************************************
@@ -1315,9 +1315,9 @@ bool pdb_new_rid(uint32_t *rid)
   If uninitialised, context will auto-init on first use.
  ***************************************************************/
 
-bool initialize_password_db(bool reload, struct event_context *event_ctx)
+bool initialize_password_db(bool reload, struct tevent_context *tevent_ctx)
 {
-       pdb_event_ctx = event_ctx;
+       pdb_tevent_ctx = tevent_ctx;
        return (pdb_get_methods_reload(reload) != NULL);
 }
 
index feda002d1331ac694df5dfc881af91048c69d5a3..b59eeb9a7e7a6a8a178f282da69f451f7660a94f 100644 (file)
@@ -6487,7 +6487,7 @@ static NTSTATUS pdb_init_ldapsam_common(struct pdb_methods **pdb_method, const c
                return NT_STATUS_NO_MEMORY;
        }
 
-       nt_status = smbldap_init(*pdb_method, pdb_get_event_context(),
+       nt_status = smbldap_init(*pdb_method, pdb_get_tevent_context(),
                                 location, &ldap_state->smbldap_state);
 
        if ( !NT_STATUS_IS_OK(nt_status) ) {