summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-08-18 18:59:23 +0200
committerGünther Deschner <gd@samba.org>2010-08-26 00:25:55 +0200
commit7a05ca2c9cd387a92e1ad699ae72caea55895c13 (patch)
treef62c3b24c67766013470d40f2193747e234634dd /source3
parentca765d2f50f8eff1537f70bb637918d90301acf4 (diff)
downloadsamba-7a05ca2c9cd387a92e1ad699ae72caea55895c13.tar.gz
samba-7a05ca2c9cd387a92e1ad699ae72caea55895c13.tar.bz2
samba-7a05ca2c9cd387a92e1ad699ae72caea55895c13.zip
s3-build: use dbwrap.h only where needed.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/groupdb/mapping_tdb.c1
-rw-r--r--source3/include/dbwrap.h38
-rw-r--r--source3/include/includes.h1
-rw-r--r--source3/include/proto.h38
-rw-r--r--source3/lib/conn_tdb.c1
-rw-r--r--source3/lib/dbwrap.c1
-rw-r--r--source3/lib/dbwrap_rbt.c1
-rw-r--r--source3/lib/dbwrap_tdb.c1
-rw-r--r--source3/lib/dbwrap_util.c1
-rw-r--r--source3/lib/messages.c1
-rw-r--r--source3/lib/privileges.c1
-rw-r--r--source3/lib/serverid.c1
-rw-r--r--source3/lib/sessionid_tdb.c1
-rw-r--r--source3/lib/sharesec.c1
-rw-r--r--source3/lib/talloc_dict.c1
-rw-r--r--source3/locking/brlock.c1
-rw-r--r--source3/locking/locking.c1
-rw-r--r--source3/locking/posix.c1
-rw-r--r--source3/modules/vfs_acl_tdb.c1
-rw-r--r--source3/modules/vfs_xattr_tdb.c1
-rw-r--r--source3/param/loadparm.c1
-rw-r--r--source3/passdb/account_pol.c1
-rw-r--r--source3/passdb/machine_account_secrets.c1
-rw-r--r--source3/passdb/machine_sid.c1
-rw-r--r--source3/passdb/pdb_tdb.c1
-rw-r--r--source3/passdb/secrets.c1
-rw-r--r--source3/registry/reg_backend_db.c1
-rw-r--r--source3/registry/reg_objects.c1
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c1
-rw-r--r--source3/smbd/connection.c1
-rw-r--r--source3/smbd/notify_internal.c1
-rw-r--r--source3/smbd/session.c1
-rw-r--r--source3/torture/torture.c1
-rw-r--r--source3/utils/dbwrap_tool.c1
-rw-r--r--source3/utils/dbwrap_torture.c1
-rw-r--r--source3/utils/net_idmap.c1
-rw-r--r--source3/utils/net_serverid.c1
-rw-r--r--source3/utils/status.c1
-rw-r--r--source3/winbindd/idmap_tdb.c1
-rw-r--r--source3/winbindd/idmap_tdb2.c1
40 files changed, 75 insertions, 39 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index f608e2e514..ee090c4ede 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "groupdb/mapping.h"
+#include "dbwrap.h"
static struct db_context *db; /* used for driver files */
diff --git a/source3/include/dbwrap.h b/source3/include/dbwrap.h
index 846e1c2815..ff7b8b6a74 100644
--- a/source3/include/dbwrap.h
+++ b/source3/include/dbwrap.h
@@ -100,4 +100,42 @@ NTSTATUS dbwrap_store_bystring(struct db_context *db, const char *key,
TDB_DATA dbwrap_fetch_bystring(struct db_context *db, TALLOC_CTX *mem_ctx,
const char *key);
+/* The following definitions come from lib/dbwrap_util.c */
+
+int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
+int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
+bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
+ uint32_t *val);
+int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
+NTSTATUS dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
+ uint32_t *oldval, uint32_t change_val);
+NTSTATUS dbwrap_trans_change_uint32_atomic(struct db_context *db,
+ const char *keystr,
+ uint32_t *oldval,
+ uint32_t change_val);
+NTSTATUS dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
+ int32_t *oldval, int32_t change_val);
+NTSTATUS dbwrap_trans_change_int32_atomic(struct db_context *db,
+ const char *keystr,
+ int32_t *oldval,
+ int32_t change_val);
+NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
+ int flag);
+NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key);
+NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr,
+ int32_t v);
+NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr,
+ uint32_t v);
+NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key,
+ TDB_DATA data, int flags);
+NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key);
+NTSTATUS dbwrap_trans_do(struct db_context *db,
+ NTSTATUS (*action)(struct db_context *, void *),
+ void *private_data);
+NTSTATUS dbwrap_delete_bystring_upper(struct db_context *db, const char *key);
+NTSTATUS dbwrap_store_bystring_upper(struct db_context *db, const char *key,
+ TDB_DATA data, int flags);
+TDB_DATA dbwrap_fetch_bystring_upper(struct db_context *db, TALLOC_CTX *mem_ctx,
+ const char *key);
+
#endif /* __DBWRAP_H__ */
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 98ba38027e..30ff742ffd 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -653,7 +653,6 @@ extern void *cmdline_lp_ctx;
#include "session.h"
#include "module.h"
-#include "dbwrap.h"
#include "packet.h"
#include "ctdbd_conn.h"
#include "../lib/util/talloc_stack.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 87b2e275ad..2a70051c48 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -497,44 +497,6 @@ int connections_forall_read(int (*fn)(const struct connections_key *key,
void *private_data);
bool connections_init(bool rw);
-/* The following definitions come from lib/dbwrap_util.c */
-
-int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
-int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
-bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
- uint32_t *val);
-int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
-NTSTATUS dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
- uint32_t *oldval, uint32_t change_val);
-NTSTATUS dbwrap_trans_change_uint32_atomic(struct db_context *db,
- const char *keystr,
- uint32_t *oldval,
- uint32_t change_val);
-NTSTATUS dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
- int32_t *oldval, int32_t change_val);
-NTSTATUS dbwrap_trans_change_int32_atomic(struct db_context *db,
- const char *keystr,
- int32_t *oldval,
- int32_t change_val);
-NTSTATUS dbwrap_trans_store(struct db_context *db, TDB_DATA key, TDB_DATA dbuf,
- int flag);
-NTSTATUS dbwrap_trans_delete(struct db_context *db, TDB_DATA key);
-NTSTATUS dbwrap_trans_store_int32(struct db_context *db, const char *keystr,
- int32_t v);
-NTSTATUS dbwrap_trans_store_uint32(struct db_context *db, const char *keystr,
- uint32_t v);
-NTSTATUS dbwrap_trans_store_bystring(struct db_context *db, const char *key,
- TDB_DATA data, int flags);
-NTSTATUS dbwrap_trans_delete_bystring(struct db_context *db, const char *key);
-NTSTATUS dbwrap_trans_do(struct db_context *db,
- NTSTATUS (*action)(struct db_context *, void *),
- void *private_data);
-NTSTATUS dbwrap_delete_bystring_upper(struct db_context *db, const char *key);
-NTSTATUS dbwrap_store_bystring_upper(struct db_context *db, const char *key,
- TDB_DATA data, int flags);
-TDB_DATA dbwrap_fetch_bystring_upper(struct db_context *db, TALLOC_CTX *mem_ctx,
- const char *key);
-
/* The following definitions come from lib/debug.c */
void gfree_debugsyms(void);
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index b95b4cd377..75841cce65 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "dbwrap.h"
static struct db_context *connections_db_ctx(bool rw)
{
diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c
index 8b3db8940a..4e7346c2c4 100644
--- a/source3/lib/dbwrap.c
+++ b/source3/lib/dbwrap.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
#ifdef CLUSTER_SUPPORT
#include "ctdb_private.h"
#endif
diff --git a/source3/lib/dbwrap_rbt.c b/source3/lib/dbwrap_rbt.c
index e9b0e4616f..af88c79e6a 100644
--- a/source3/lib/dbwrap_rbt.c
+++ b/source3/lib/dbwrap_rbt.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
#include "../lib/util/rbtree.h"
#define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c
index 297a351764..4cdc1930ee 100644
--- a/source3/lib/dbwrap_tdb.c
+++ b/source3/lib/dbwrap_tdb.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
struct db_tdb_ctx {
struct tdb_wrap *wtdb;
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index 74b22655e2..8ebc4f474f 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr)
{
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index ba0cd8023c..5212c8eb4d 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -48,6 +48,7 @@
#include "includes.h"
#include "librpc/gen_ndr/messaging.h"
#include "librpc/gen_ndr/ndr_messaging.h"
+#include "dbwrap.h"
struct messaging_callback {
struct messaging_callback *prev, *next;
diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c
index 86f84904f3..f629d45c1d 100644
--- a/source3/lib/privileges.c
+++ b/source3/lib/privileges.c
@@ -22,6 +22,7 @@
#include "includes.h"
+#include "dbwrap.h"
#define PRIVPREFIX "PRIV_"
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 0fac3759e7..fefcc5df7c 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "serverid.h"
+#include "dbwrap.h"
struct serverid_key {
pid_t pid;
diff --git a/source3/lib/sessionid_tdb.c b/source3/lib/sessionid_tdb.c
index 6efbafd46d..1515728bd9 100644
--- a/source3/lib/sessionid_tdb.c
+++ b/source3/lib/sessionid_tdb.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
static struct db_context *session_db_ctx(void)
{
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index f84c8c5f81..1b137a66db 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "../librpc/gen_ndr/ndr_security.h"
+#include "dbwrap.h"
/*******************************************************************
Create the share security tdb.
diff --git a/source3/lib/talloc_dict.c b/source3/lib/talloc_dict.c
index 18b88d9931..94c2e5201e 100644
--- a/source3/lib/talloc_dict.c
+++ b/source3/lib/talloc_dict.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
struct talloc_dict {
struct db_context *db;
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 6c6094cac0..408917ef2e 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "librpc/gen_ndr/messaging.h"
#include "smbd/globals.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 24998ab588..89bd19a710 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -38,6 +38,7 @@
#include "includes.h"
#include "librpc/gen_ndr/messaging.h"
#include "smbd/globals.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index e6acbe8bac..3bddb630db 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 8da0d1e3ee..f31e09332a 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -24,6 +24,7 @@
#include "librpc/gen_ndr/xattr.h"
#include "librpc/gen_ndr/ndr_xattr.h"
#include "../lib/crypto/crypto.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 28b21b6bf6..ab40af4d6e 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -21,6 +21,7 @@
#include "librpc/gen_ndr/xattr.h"
#include "librpc/gen_ndr/ndr_xattr.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 225f6c927b..ad27233f9a 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -61,6 +61,7 @@
#include "../librpc/gen_ndr/svcctl.h"
#include "smb_signing.h"
+#include "dbwrap.h"
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c
index 7a3e7de140..a66c48d396 100644
--- a/source3/passdb/account_pol.c
+++ b/source3/passdb/account_pol.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
static struct db_context *db;
/* cache all entries for 60 seconds for to save ldap-queries (cache is updated
diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c
index c5a8faf694..f3206d4eb8 100644
--- a/source3/passdb/machine_account_secrets.c
+++ b/source3/passdb/machine_account_secrets.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
#include "secrets.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index 0f735c40ef..c3534f7fa7 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "secrets.h"
+#include "dbwrap.h"
/* NOTE! the global_sam_sid is the SID of our local SAM. This is only
equal to the domain SID when we are a DC, otherwise its our
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 526633b58d..e1c2c437ff 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
#if 0 /* when made a module use this */
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 52c8e8060f..1bb0e25cf7 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -26,6 +26,7 @@
#include "../libcli/auth/libcli_auth.h"
#include "librpc/gen_ndr/ndr_secrets.h"
#include "secrets.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 3fdea105b1..2d7b97d7b8 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -28,6 +28,7 @@
#include "reg_backend_db.h"
#include "reg_objects.h"
#include "nt_printing.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 04b981015e..eb3437286a 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_objects.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index af15e7e13e..ceee47d443 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -27,6 +27,7 @@
#include "../librpc/gen_ndr/srv_srvsvc.h"
#include "librpc/gen_ndr/messaging.h"
#include "../librpc/gen_ndr/ndr_security.h"
+#include "dbwrap.h"
extern const struct generic_mapping file_generic_mapping;
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 9b766d586e..9653723e13 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "dbwrap.h"
/****************************************************************************
Delete a connection record.
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index c559c1f53e..d1475d2f7a 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -26,6 +26,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_notify.h"
#include "librpc/gen_ndr/messaging.h"
+#include "dbwrap.h"
struct notify_context {
struct db_context *db_recursive;
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index a8bb0daa3a..185ba800be 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -28,6 +28,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "dbwrap.h"
/********************************************************************
called when a session is created
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index fdff8a7d05..bc0e573011 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -27,6 +27,7 @@
#include "../librpc/gen_ndr/svcctl.h"
#include "memcache.h"
#include "nsswitch/winbind_client.h"
+#include "dbwrap.h"
extern char *optarg;
extern int optind;
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 6fbef5f131..da96bd706f 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "dbwrap.h"
extern bool AllowDebugChange;
diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c
index 1430161858..1fdad0eb29 100644
--- a/source3/utils/dbwrap_torture.c
+++ b/source3/utils/dbwrap_torture.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "popt_common.h"
+#include "dbwrap.h"
#if 0
#include "lib/events/events.h"
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c
index 8bcb79fabf..268d5222c8 100644
--- a/source3/utils/net_idmap.c
+++ b/source3/utils/net_idmap.c
@@ -22,6 +22,7 @@
#include "utils/net.h"
#include "secrets.h"
#include "idmap.h"
+#include "dbwrap.h"
#define ALLOC_CHECK(mem) do { \
if (!mem) { \
diff --git a/source3/utils/net_serverid.c b/source3/utils/net_serverid.c
index 87974d2460..0561b84474 100644
--- a/source3/utils/net_serverid.c
+++ b/source3/utils/net_serverid.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "utils/net.h"
+#include "dbwrap.h"
static int net_serverid_list_fn(const struct server_id *id,
uint32_t msg_flags, void *priv)
diff --git a/source3/utils/status.c b/source3/utils/status.c
index fb23789d0e..12595236e7 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -32,6 +32,7 @@
#include "includes.h"
#include "popt_common.h"
+#include "dbwrap.h"
#define SMB_MAXPIDS 2048
static uid_t Ucrit_uid = 0; /* added by OH */
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index d04541fc24..9a274fc9ff 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -27,6 +27,7 @@
#include "winbindd.h"
#include "idmap.h"
#include "idmap_rw.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index 77ebbebc66..0613fdb596 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -35,6 +35,7 @@
#include "winbindd.h"
#include "idmap.h"
#include "idmap_rw.h"
+#include "dbwrap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP