mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3-build: use dbwrap.h only where needed.
Guenther
This commit is contained in:
parent
ca765d2f50
commit
7a05ca2c9c
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "groupdb/mapping.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
static struct db_context *db; /* used for driver files */
|
||||
|
||||
|
@ -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__ */
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smbd/globals.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
static struct db_context *connections_db_ctx(bool rw)
|
||||
{
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
#ifdef CLUSTER_SUPPORT
|
||||
#include "ctdb_private.h"
|
||||
#endif
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
#include "../lib/util/rbtree.h"
|
||||
|
||||
#define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
struct db_tdb_ctx {
|
||||
struct tdb_wrap *wtdb;
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
#define PRIVPREFIX "PRIV_"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "serverid.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
struct serverid_key {
|
||||
pid_t pid;
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
static struct db_context *session_db_ctx(void)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "../librpc/gen_ndr/ndr_security.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
/*******************************************************************
|
||||
Create the share security tdb.
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
struct talloc_dict {
|
||||
struct db_context *db;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_LOCKING
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
#if 0 /* when made a module use this */
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smbd/globals.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
/****************************************************************************
|
||||
Delete a connection record.
|
||||
|
@ -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;
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smbd/globals.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
/********************************************************************
|
||||
called when a session is created
|
||||
|
@ -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;
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
extern bool AllowDebugChange;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "popt_common.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
#if 0
|
||||
#include "lib/events/events.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "utils/net.h"
|
||||
#include "secrets.h"
|
||||
#include "idmap.h"
|
||||
#include "dbwrap.h"
|
||||
|
||||
#define ALLOC_CHECK(mem) do { \
|
||||
if (!mem) { \
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user