s3-build: use dbwrap.h only where needed.
authorGünther Deschner <gd@samba.org>
Wed, 18 Aug 2010 16:59:23 +0000 (18:59 +0200)
committerGünther Deschner <gd@samba.org>
Wed, 25 Aug 2010 22:25:55 +0000 (00:25 +0200)
Guenther

40 files changed:
source3/groupdb/mapping_tdb.c
source3/include/dbwrap.h
source3/include/includes.h
source3/include/proto.h
source3/lib/conn_tdb.c
source3/lib/dbwrap.c
source3/lib/dbwrap_rbt.c
source3/lib/dbwrap_tdb.c
source3/lib/dbwrap_util.c
source3/lib/messages.c
source3/lib/privileges.c
source3/lib/serverid.c
source3/lib/sessionid_tdb.c
source3/lib/sharesec.c
source3/lib/talloc_dict.c
source3/locking/brlock.c
source3/locking/locking.c
source3/locking/posix.c
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_xattr_tdb.c
source3/param/loadparm.c
source3/passdb/account_pol.c
source3/passdb/machine_account_secrets.c
source3/passdb/machine_sid.c
source3/passdb/pdb_tdb.c
source3/passdb/secrets.c
source3/registry/reg_backend_db.c
source3/registry/reg_objects.c
source3/rpc_server/srv_srvsvc_nt.c
source3/smbd/connection.c
source3/smbd/notify_internal.c
source3/smbd/session.c
source3/torture/torture.c
source3/utils/dbwrap_tool.c
source3/utils/dbwrap_torture.c
source3/utils/net_idmap.c
source3/utils/net_serverid.c
source3/utils/status.c
source3/winbindd/idmap_tdb.c
source3/winbindd/idmap_tdb2.c

index f608e2e51440554e654882146bc8883745cf0a95..ee090c4edef3aa0cf4e16e10f5135167d8bcc88f 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "groupdb/mapping.h"
+#include "dbwrap.h"
 
 static struct db_context *db; /* used for driver files */
 
index 846e1c2815a325c25d31cc46dda1c2ee1d8632b2..ff7b8b6a74f27546833b8102bf4f90e318c937fc 100644 (file)
@@ -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__ */
index 98ba38027e646a578955a01e870a5fa2c294a43a..30ff742ffd42f71bc22dacd3f66c6a190ec96dde 100644 (file)
@@ -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"
index 87b2e275ad3dfcd2e8a3bb82ef43d9655d434115..2a70051c488443439ad9f43d14330789ff15ebb4 100644 (file)
@@ -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);
index b95b4cd377cde89599b9f912fd86260cc6a02a8a..75841cce65779b5536fe056f5054ad53985e4227 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "smbd/globals.h"
+#include "dbwrap.h"
 
 static struct db_context *connections_db_ctx(bool rw)
 {
index 8b3db8940aab13545a3e7fa8833cd03fd6313d17..4e7346c2c4f73289ab9d0f0d3c0c385094741958 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 #ifdef CLUSTER_SUPPORT
 #include "ctdb_private.h"
 #endif
index e9b0e4616f64d1b3a2282e7fa7d256569971d427..af88c79e6a4fd6a8da6df28a8ec9db9f5358cc14 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 #include "../lib/util/rbtree.h"
 
 #define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
index 297a351764ec0e344e1076b5761524389ac70416..4cdc1930eed2dcea2eb0598a6b687aa64540a3fb 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 struct db_tdb_ctx {
        struct tdb_wrap *wtdb;
index 74b22655e2ba30d0785ceb3e4fc6ca5806b297ee..8ebc4f474f618db67d684cda8445a060458b5e0a 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr)
 {
index ba0cd8023c4e99b7cd5c262f83f741f191b49fce..5212c8eb4da13402be1f7858ac0e3a3b928cc0f6 100644 (file)
@@ -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;
index 86f84904f378be00c2e3522e5b2d49b36a138b39..f629d45c1d58c543a90c6a65984653be10208b53 100644 (file)
@@ -22,6 +22,7 @@
 
 
 #include "includes.h"
+#include "dbwrap.h"
 
 #define PRIVPREFIX              "PRIV_"
 
index 0fac3759e73bf21dd10b535b6c1092506900ea64..fefcc5df7c57423092d712c58d4e9a0a1becc4e2 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "serverid.h"
+#include "dbwrap.h"
 
 struct serverid_key {
        pid_t pid;
index 6efbafd46d5c100f4f2fc9612d52caae30ede9a3..1515728bd941ef2da0aaae7d51c4fc7b6a497916 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 static struct db_context *session_db_ctx(void)
 {
index f84c8c5f815677d1cf08886afb11ee6f993ef5f3..1b137a66db56d9baa337d2a54f37e6cfe5305ab6 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/ndr_security.h"
+#include "dbwrap.h"
 
 /*******************************************************************
  Create the share security tdb.
index 18b88d9931090d318988b3164a9fa0f69b850c26..94c2e5201e7d0465ed23f21be2cced3d1735125b 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 struct talloc_dict {
        struct db_context *db;
index 6c6094cac01a0ae709977f02ac8587acb431baef..408917ef2ec74675f67633d5780d79ac178a9d23 100644 (file)
@@ -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
index 24998ab58894a6d91fb5ae2c9fa09aad38bc07c5..89bd19a7105c2e25556b0314356baa64115dc966 100644 (file)
@@ -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
index e6acbe8bac4f2f38e397067043c0452150a585f5..3bddb630dbacc01cc4072e96e04680b8a4991ff5 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_LOCKING
index 8da0d1e3ee965962acda3b402334b9f37f986ecd..f31e09332a5cc71a951b8bda9d5487d42ae3199f 100644 (file)
@@ -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
index 28b21b6bf6964071a4439208c17ee06bc86bc2ff..ab40af4d6e7e1560e09d52680eb7c244adb83a01 100644 (file)
@@ -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
index 225f6c927b71007cf8a2cb9f0f09360fa8955b87..ad27233f9a9a2dfc983ca9afef953ffce79dbd2a 100644 (file)
@@ -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>
index 7a3e7de140994571dbe1f01509728b9729bc58f0..a66c48d396733ba5bf16b2afd6cc291bac1350ed 100644 (file)
@@ -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
index c5a8faf694dd137ea62e4e6a5dfb74df1443eeda..f3206d4eb8e11c7b756c0ae8a786a266fc54696b 100644 (file)
@@ -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
index 0f735c40efb476caab99d5fa15eb639b65b40671..c3534f7fa71148745614e97d1bf575c0b8ba6559 100644 (file)
@@ -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
index 526633b58dfb67e5856b17464e61ea570a2e3d3c..e1c2c437ff690a4e2d16adb2957d65e57d00b21c 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 #if 0 /* when made a module use this */
 
index 52c8e8060fe2b29ec66c328081a6ce49abccec79..1bb0e25cf77a84c71d1bc055da208ca97c9952cb 100644 (file)
@@ -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
index 3fdea105b16a7845f86c9b606aa815d837c5c584..2d7b97d7b8212b9e82c79c70a5621cb8fc9859a8 100644 (file)
@@ -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
index 04b981015e5b3553ea949cfa0e2fe76d64c59650..eb3437286a65ab46cfa2d2a364db90c66d4e275a 100644 (file)
@@ -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
index af15e7e13efdaabca6ac6b8eb63191b0ee7c901f..ceee47d443ebd8c6f9d7fb4d0b4919b14855a2cb 100644 (file)
@@ -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;
 
index 9b766d586e19750634bf9dca009f018d54db47fa..9653723e13fac3e0b9c72ef5b0620a46eb61323b 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "includes.h"
 #include "smbd/globals.h"
+#include "dbwrap.h"
 
 /****************************************************************************
  Delete a connection record.
index c559c1f53e02af860ab714e6cabd78bc4961c344..d1475d2f7a6d377f26d036448b27c499ae3f88b0 100644 (file)
@@ -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;
index a8bb0daa3ab2bd2a5cad6e76589444fdce5fabd0..185ba800becf329a56f4a22bfdd28f708f26323c 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "includes.h"
 #include "smbd/globals.h"
+#include "dbwrap.h"
 
 /********************************************************************
  called when a session is created
index fdff8a7d054c200f8cbc027bc7b5401b8eb05362..bc0e573011d55203e2fc44df7fd964e64270e3bb 100644 (file)
@@ -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;
index 6fbef5f131399085ff55a23b4f68c343eaeb348a..da96bd706f96d950c72a69c8850d66d6a671b15d 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "dbwrap.h"
 
 extern bool AllowDebugChange;
 
index 14301618586019c46fbee0bb7cad3d7d136f5e74..1fdad0eb29b541433caa9baef2f2269665a3faa9 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "popt_common.h"
+#include "dbwrap.h"
 
 #if 0
 #include "lib/events/events.h"
index 8bcb79fabf0146895224c4c74a0fd701eed597ce..268d5222c85c0904e98411a1a7c82cba61403b0c 100644 (file)
@@ -22,6 +22,7 @@
 #include "utils/net.h"
 #include "secrets.h"
 #include "idmap.h"
+#include "dbwrap.h"
 
 #define ALLOC_CHECK(mem) do { \
        if (!mem) { \
index 87974d2460d34c1517b9a2800410378de24f96b4..0561b8447442a71e89df200b0e017d41c418919a 100644 (file)
@@ -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)
index fb23789d0eea202c781f0dd68b2dc49a2144d885..12595236e77a56504ace5201d272879f9384f9d7 100644 (file)
@@ -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 */
index d04541fc2482d2119e3da846dddbe1b1f0d45ba9..9a274fc9ff2137d5bb07d2f57c93f2035693e590 100644 (file)
@@ -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
index 77ebbebc662e60f55e87a2756aaaf4a9b7dcb26f..0613fdb596ffde3ff644ab9a9cdfbcdf2cdd069e 100644 (file)
@@ -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