1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: only include tdb headers where needed.

Guenther
This commit is contained in:
Günther Deschner 2011-05-05 11:25:29 +02:00
parent 8aae59a277
commit d8cfca3a9b
68 changed files with 81 additions and 8 deletions

View File

@ -26,6 +26,7 @@
#include "groupdb/mapping.h"
#include "../libcli/security/security.h"
#include "lib/winbind_util.h"
#include <tdb.h>
static const struct mapping_backend *backend;

View File

@ -25,6 +25,7 @@
#include "passdb.h"
#include "groupdb/mapping.h"
#include "dbwrap.h"
#include "util_tdb.h"
#include "../libcli/security/security.h"
static struct db_context *db; /* used for driver files */

View File

@ -20,6 +20,8 @@
#ifndef _CTDBD_CONN_H
#define _CTDBD_CONN_H
#include <tdb.h>
struct ctdbd_connection;
struct messaging_context;
struct messaging_rec;

View File

@ -20,6 +20,8 @@
#ifndef __DBWRAP_H__
#define __DBWRAP_H__
#include <tdb.h>
struct db_record {
TDB_DATA key, value;
NTSTATUS (*store)(struct db_record *rec, TDB_DATA data, int flag);

View File

@ -510,8 +510,6 @@ typedef char fstring[FSTRING_LEN];
#include "../lib/util/attr.h"
#include "../lib/util/tsort.h"
#include "../lib/util/dlinklist.h"
#include <tdb.h>
#include "util_tdb.h"
#include <talloc.h>
@ -522,6 +520,7 @@ typedef char fstring[FSTRING_LEN];
#include "../lib/util/debug.h"
#include "../lib/util/debug_s3.h"
#include "../libcli/util/ntstatus.h"
#include "libads/ads_status.h"
#include "../libcli/util/error.h"
#include "../lib/util/charset/charset.h"

View File

@ -158,9 +158,12 @@ extern struct printif iprint_printif;
/* There can be this many printing tdb's open, plus any locked ones. */
#define MAX_PRINT_DBS_OPEN 1
struct TDB_DATA;
struct tdb_context;
struct tdb_print_db {
struct tdb_print_db *next, *prev;
TDB_CONTEXT *tdb;
struct tdb_context *tdb;
int ref_count;
fstring printer_name;
};
@ -249,7 +252,7 @@ uint32_t print_parse_jobid(const char *fname);
struct tdb_print_db *get_print_db_byname(const char *printername);
void release_print_db( struct tdb_print_db *pdb);
void close_all_print_db(void);
TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
struct TDB_DATA get_printer_notify_pid_list(struct tdb_context *tdb, const char *printer_name, bool cleanlist);
void print_queue_receive(struct messaging_context *msg,
void *private_data,

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "intl/lang_tdb.h"
#include "util_tdb.h"
static TDB_CONTEXT *tdb;

View File

@ -19,6 +19,7 @@
*/
#include "includes.h"
#include "util_tdb.h"
#ifdef CLUSTER_SUPPORT

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "dbwrap.h"
#include "util_tdb.h"
#ifdef CLUSTER_SUPPORT
#include "ctdb_private.h"
#endif

View File

@ -20,6 +20,8 @@
#include "includes.h"
#include "system/filesys.h"
#include "lib/util/tdb_wrap.h"
#include "util_tdb.h"
#ifdef CLUSTER_SUPPORT
#include "ctdb.h"
#include "ctdb_private.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "dbwrap.h"
#include "util_tdb.h"
int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr)
{

View File

@ -24,6 +24,7 @@
#include "system/filesys.h"
#include "lib/eventlog/eventlog.h"
#include "../libcli/security/security.h"
#include "util_tdb.h"
/* maintain a list of open eventlog tdbs with reference counts */

View File

@ -17,6 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <tdb.h>
/* Defines for TDB keys */
#define EVT_OLDEST_ENTRY "INFO/oldest_entry"
#define EVT_NEXT_RECORD "INFO/next_record"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "g_lock.h"
#include "util_tdb.h"
#include "ctdbd_conn.h"
#include "../lib/util/select.h"
#include "system/select.h"

View File

@ -24,6 +24,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "system/glob.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_TDB

View File

@ -19,6 +19,7 @@
#include "includes.h"
#include "messages.h"
#include "util_tdb.h"
#ifdef CLUSTER_SUPPORT

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "lib/util/tdb_wrap.h"
#include "util_tdb.h"
/* For reasons known only to MS, many of their NT/Win2k versions
need serialised access only. Two connections at the same time

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "serverid.h"
#include "util_tdb.h"
#include "dbwrap.h"
#include "lib/util/tdb_wrap.h"

View File

@ -21,6 +21,7 @@
#include "system/filesys.h"
#include "dbwrap.h"
#include "session.h"
#include "util_tdb.h"
static struct db_context *session_db_ctx(void)
{

View File

@ -22,6 +22,7 @@
#include "../libcli/security/security.h"
#include "../librpc/gen_ndr/ndr_security.h"
#include "dbwrap.h"
#include "util_tdb.h"
/*******************************************************************
Create the share security tdb.

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "dbwrap.h"
#include "talloc_dict.h"
#include "util_tdb.h"
struct talloc_dict {
struct db_context *db;

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "util_tdb.h"
#include "tdb_validate.h"
/*

View File

@ -24,6 +24,7 @@
#include "includes.h"
#include "system/passwd.h"
#include "system/filesys.h"
#include "util_tdb.h"
#include "ctdbd_conn.h"
#include "../lib/util/util_pw.h"
#include "messages.h"

View File

@ -21,6 +21,8 @@
#include "includes.h"
#include "system/filesys.h"
#include "util_tdb.h"
#undef malloc
#undef realloc
#undef calloc

View File

@ -23,6 +23,7 @@
#include "../libcli/security/security.h"
#include "../libds/common/flags.h"
#include "../librpc/gen_ndr/ndr_drsuapi.h"
#include "util_tdb.h"
#include "dbwrap.h"
#include "../libds/common/flag_mapping.h"
#include "passdb.h"

View File

@ -25,6 +25,7 @@
#include "system/filesys.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
#include "../libcli/security/security.h"
#include "util_tdb.h"
#define NETSAMLOGON_TDB "netsamlogon_cache.tdb"

View File

@ -27,6 +27,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "smb_share_modes.h"
#include <tdb.h>
/* Database context handle. */
struct smbdb_ctx {

View File

@ -43,6 +43,7 @@
#include "../libcli/security/security.h"
#include "serverid.h"
#include "messages.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING

View File

@ -25,6 +25,7 @@
#include "system/filesys.h"
#include "locking/proto.h"
#include "dbwrap.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING

View File

@ -26,6 +26,7 @@
#include "include/dbwrap.h"
#include "system/filesys.h"
#include "passdb/lookup_sid.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_ACLS

View File

@ -28,6 +28,7 @@
#include "../lib/crypto/crypto.h"
#include "dbwrap.h"
#include "auth.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS

View File

@ -24,6 +24,7 @@
#include "librpc/gen_ndr/ndr_xattr.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
#include "dbwrap.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS

View File

@ -23,6 +23,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "nmbd/nmbd.h"
#include "util_tdb.h"
#define WINS_LIST "wins.dat"
#define WINS_VERSION 1

View File

@ -53,6 +53,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "util_tdb.h"
#include "printing.h"
#include "lib/smbconf/smbconf.h"
#include "lib/smbconf/smbconf_init.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "passdb.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -28,6 +28,7 @@
#include "secrets.h"
#include "dbwrap.h"
#include "../librpc/ndr/libndr.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -29,6 +29,7 @@
#include "secrets.h"
#include "../libcli/security/security.h"
#include "../lib/util/util_pw.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -27,6 +27,7 @@
#include "passdb.h"
#include "dbwrap.h"
#include "../libcli/security/security.h"
#include "util_tdb.h"
#if 0 /* when made a module use this */

View File

@ -30,6 +30,7 @@
#include "secrets.h"
#include "dbwrap.h"
#include "../libcli/security/security.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -25,6 +25,7 @@
#include "nt_printing.h"
#include "printing/notify.h"
#include "messages.h"
#include "util_tdb.h"
static TALLOC_CTX *send_ctx;

View File

@ -28,6 +28,7 @@
#include "librpc/gen_ndr/ndr_security.h"
#include "rpc_server/rpc_ncacn_np.h"
#include "auth.h"
#include "util_tdb.h"
#define FORMS_PREFIX "FORMS/"
#define DRIVERS_PREFIX "DRIVERS/"

View File

@ -26,6 +26,7 @@
#include "librpc/gen_ndr/spoolss.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "libcli/security/security.h"
#include "util_tdb.h"
#define FORMS_PREFIX "FORMS/"
#define DRIVERS_PREFIX "DRIVERS/"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "dbwrap.h"
#include "util_tdb.h"
#include "printer_list.h"
#define PL_DB_NAME() lock_path("printer_list.tdb")

View File

@ -32,6 +32,7 @@
#include "smbd/smbd.h"
#include "auth.h"
#include "messages.h"
#include "util_tdb.h"
extern struct current_user current_user;
extern userdom_struct current_user_info;

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "printing.h"
#include "util_tdb.h"
static struct tdb_print_db *print_db_head;
@ -159,7 +160,7 @@ void close_all_print_db(void)
messages. data needs freeing on exit.
****************************************************************************/
TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist)
struct TDB_DATA get_printer_notify_pid_list(struct tdb_context *tdb, const char *printer_name, bool cleanlist)
{
TDB_DATA data;
size_t i;

View File

@ -23,6 +23,7 @@
#include "system/passwd.h"
#include "system/filesys.h"
#include "printing.h"
#include "util_tdb.h"
#ifdef malloc
#undef malloc

View File

@ -28,6 +28,7 @@
#include "reg_backend_db.h"
#include "reg_objects.h"
#include "nt_printing.h"
#include "util_tdb.h"
#include "dbwrap.h"
#undef DBGC_CLASS

View File

@ -23,6 +23,7 @@
#include "includes.h"
#include "registry.h"
#include "reg_objects.h"
#include "util_tdb.h"
#include "dbwrap.h"
#include "../libcli/registry/util_reg.h"

View File

@ -25,6 +25,7 @@
#include "registry.h"
#include "reg_perfcount.h"
#include "../libcli/registry/util_reg.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY

View File

@ -30,6 +30,7 @@
#include "rpc_client/cli_winreg.h"
#include "smbd/smbd.h"
#include "auth.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV

View File

@ -50,6 +50,7 @@
#include "auth.h"
#include "messages.h"
#include "rpc_server/spoolss/srv_spoolss_nt.h"
#include "util_tdb.h"
/* macros stolen from s4 spoolss server */
#define SPOOLSS_BUFFER_UNION(fn,info,level) \

View File

@ -21,6 +21,7 @@
#include "smbd/smbd.h"
#include "smbd/globals.h"
#include "libcli/security/security.h"
#include "util_tdb.h"
#define VALID_FNUM(fnum) (((fnum) >= 0) && ((fnum) < real_max_open_files))

View File

@ -22,6 +22,7 @@
#include "smbd/globals.h"
#include "memcache.h"
#include "messages.h"
#include <tdb.h>
#if defined(WITH_AIO)
struct aio_extra *aio_list_head = NULL;

View File

@ -47,7 +47,8 @@ struct fsp_singleton_cache {
extern const struct mangle_fns *mangle_fns;
extern unsigned char *chartest;
extern TDB_CONTEXT *tdb_mangled_cache;
struct tdb_context;
extern struct tdb_context *tdb_mangled_cache;
/*
this determines how many characters are used from the original filename

View File

@ -25,6 +25,7 @@
#include "smbd/smbd.h"
#include "smbd/globals.h"
#include "mangle.h"
#include "util_tdb.h"
/* -------------------------------------------------------------------------- **
* Other stuff...

View File

@ -30,6 +30,7 @@
#include "smbd/smbd.h"
#include "messages.h"
#include "lib/util/tdb_wrap.h"
#include "util_tdb.h"
struct notify_context {
struct db_context *db_recursive;

View File

@ -999,7 +999,8 @@ bool stat_cache_lookup(connection_struct *conn,
void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
const char *name);
void stat_cache_delete(const char *name);
unsigned int fast_string_hash(TDB_DATA *key);
struct TDB_DATA;
unsigned int fast_string_hash(struct TDB_DATA *key);
bool reset_stat_cache( void );
/* The following definitions come from smbd/statvfs.c */

View File

@ -25,6 +25,7 @@
#include "smbd/smbd.h"
#include "messages.h"
#include "smbprofile.h"
#include <tdb.h>
/****************************************************************************
Stat cache code used in unix_convert.
@ -376,7 +377,7 @@ void stat_cache_delete(const char *name)
JRA. Use a djb-algorithm hash for speed.
***************************************************************/
unsigned int fast_string_hash(TDB_DATA *key)
unsigned int fast_string_hash(struct TDB_DATA *key)
{
unsigned int n = 0;
const char *p;

View File

@ -21,6 +21,7 @@
#include "system/filesys.h"
#include "torture/proto.h"
#include "libsmb/clirap.h"
#include "util_tdb.h"
extern int torture_numops;

View File

@ -35,6 +35,7 @@
#include "trans2.h"
#include "libsmb/nmblib.h"
#include "../lib/util/tevent_ntstatus.h"
#include "util_tdb.h"
extern char *optarg;
extern int optind;

View File

@ -25,6 +25,7 @@
#include "dbwrap.h"
#include "../libcli/security/security.h"
#include "net_idmap_check.h"
#include "util_tdb.h"
#define ALLOC_CHECK(mem) do { \
if (!mem) { \

View File

@ -32,6 +32,7 @@
#include "cbuf.h"
#include "srprs.h"
#include <termios.h>
#include "util_tdb.h"
static int traverse_commit(struct db_record *diff_rec, void* data);
static int traverse_check(struct db_record *rec, void* data);

View File

@ -28,6 +28,7 @@
#include "rpc_client/cli_spoolss.h"
#include "../libcli/security/security.h"
#include "../librpc/gen_ndr/ndr_security.h"
#include "util_tdb.h"
#define FORMS_PREFIX "FORMS/"
#define DRIVERS_PREFIX "DRIVERS/"

View File

@ -31,6 +31,7 @@
#include "printing/notify.h"
#include "libsmb/nmblib.h"
#include "messages.h"
#include "util_tdb.h"
#if HAVE_LIBUNWIND_H
#include <libunwind.h>

View File

@ -28,6 +28,7 @@
#include "dbwrap.h"
#include "idmap.h"
#include "../libcli/security/dom_sid.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -30,6 +30,7 @@
#include "idmap_rw.h"
#include "dbwrap.h"
#include "../libcli/security/security.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -38,6 +38,7 @@
#include "idmap_rw.h"
#include "dbwrap.h"
#include "../libcli/security/dom_sid.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -33,6 +33,7 @@
#include "nss_info.h"
#include "../libcli/security/security.h"
#include "passdb/machine_sid.h"
#include "util_tdb.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND