mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
build: don't autogenerate prototypes for util_tdb and dbwrap anymore.
Stick to hand-written headers (that are there anyways). Add some missing prototypes to util_tdb.h and dbwrap.h. I did not bother to add a header for each single dbwrap backend open function but put the prototypes for the open functions into the central dbwrap.h. Michael
This commit is contained in:
parent
c967b62dd3
commit
edf4dbed27
@ -327,7 +327,8 @@ LIB_WITHOUT_PROTO_OBJ = $(LIBSAMBAUTIL_OBJ) \
|
||||
lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
|
||||
lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o lib/talloc_stack.o \
|
||||
lib/interfaces.o lib/rbtree.o lib/memcache.o \
|
||||
lib/util_transfer_file.o lib/async_req.o
|
||||
lib/util_transfer_file.o lib/async_req.o \
|
||||
$(TDB_OBJ)
|
||||
|
||||
LIB_WITH_PROTO_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
|
||||
lib/interface.o lib/md4.o \
|
||||
@ -345,7 +346,7 @@ LIB_WITH_PROTO_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
|
||||
lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
|
||||
lib/md5.o lib/hmacmd5.o lib/arc4.o lib/iconv.o \
|
||||
lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
|
||||
lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
|
||||
lib/adt_tree.o lib/gencache.o \
|
||||
lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
|
||||
lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
|
||||
libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
|
||||
|
@ -54,6 +54,27 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
|
||||
int hash_size, int tdb_flags,
|
||||
int open_flags, mode_t mode);
|
||||
|
||||
struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx);
|
||||
|
||||
struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
|
||||
const char *name,
|
||||
int hash_size, int tdb_flags,
|
||||
int open_flags, mode_t mode);
|
||||
|
||||
#ifdef CLUSTER_SUPPORT
|
||||
struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
const char *name,
|
||||
int hash_size, int tdb_flags,
|
||||
int open_flags, mode_t mode);
|
||||
#endif
|
||||
|
||||
struct db_context *db_open_file(TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx,
|
||||
const char *name,
|
||||
int hash_size, int tdb_flags,
|
||||
int open_flags, mode_t mode);
|
||||
|
||||
|
||||
NTSTATUS dbwrap_delete_bystring(struct db_context *db, const char *key);
|
||||
NTSTATUS dbwrap_store_bystring(struct db_context *db, const char *key,
|
||||
TDB_DATA data, int flags);
|
||||
|
@ -22,6 +22,9 @@
|
||||
|
||||
#include "tdb.h"
|
||||
|
||||
#include "talloc.h" /* for tdb_wrap_open() */
|
||||
#include "nt_status.h" /* for map_nt_error_from_tdb() */
|
||||
|
||||
/* single node of a list returned by tdb_search_keys */
|
||||
typedef struct keys_node
|
||||
{
|
||||
@ -62,6 +65,8 @@ bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value
|
||||
int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf,
|
||||
void *state);
|
||||
int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
|
||||
int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr,
|
||||
TDB_DATA data, int flags);
|
||||
TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr);
|
||||
int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr);
|
||||
struct tdb_context *tdb_open_log(const char *name, int hash_size,
|
||||
@ -73,9 +78,21 @@ TDB_DATA string_tdb_data(const char *string);
|
||||
TDB_DATA string_term_tdb_data(const char *string);
|
||||
int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf,
|
||||
int flag);
|
||||
int tdb_trans_delete(struct tdb_context *tdb, TDB_DATA key);
|
||||
bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
|
||||
uint32 *oldval, uint32 change_val);
|
||||
int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key,
|
||||
unsigned int timeout);
|
||||
|
||||
struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx,
|
||||
const char *name, int hash_size, int tdb_flags,
|
||||
int open_flags, mode_t mode);
|
||||
NTSTATUS map_nt_error_from_tdb(enum TDB_ERROR err);
|
||||
|
||||
int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn);
|
||||
int tdb_validate_open(const char *tdb_path, tdb_validate_data_func validate_fn);
|
||||
int tdb_validate_and_backup(const char *tdb_path,
|
||||
tdb_validate_data_func validate_fn);
|
||||
|
||||
|
||||
#endif /* __TDBUTIL_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user