mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
r19428: moved tdbutil.c from lib/tdb/common/ to lib/util/util_tdb.c
tdbutil.c is Samba specific, so should not be part of the generic tdb
library
(This used to be commit 979dd24f5e
)
This commit is contained in:
parent
b316b78cd5
commit
af870da619
@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "system/time.h"
|
||||
#include "system/filesys.h"
|
||||
#include "db_wrap.h"
|
||||
|
@ -7,6 +7,7 @@ OBJ_FILES = \
|
||||
PUBLIC_DEPENDENCIES = \
|
||||
DB_WRAP \
|
||||
NDR_IRPC \
|
||||
UNIX_PRIVS
|
||||
UNIX_PRIVS \
|
||||
UTIL_TDB
|
||||
# End SUBSYSTEM MESSAGING
|
||||
################################################
|
||||
|
@ -29,9 +29,10 @@
|
||||
#include "librpc/gen_ndr/ndr_irpc.h"
|
||||
#include "lib/messaging/irpc.h"
|
||||
#include "db_wrap.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/util/unix_privs.h"
|
||||
#include "librpc/rpc/dcerpc.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
|
||||
/* change the message version with any incompatible changes in the protocol */
|
||||
#define MESSAGING_VERSION 1
|
||||
|
@ -21,7 +21,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "system/filesys.h"
|
||||
#include "libcli/security/security.h"
|
||||
|
||||
|
@ -24,7 +24,8 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "system/filesys.h"
|
||||
#include "libcli/security/security.h"
|
||||
|
@ -19,7 +19,8 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "system/filesys.h"
|
||||
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "includes.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "librpc/gen_ndr/winreg.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "system/filesys.h"
|
||||
#include "pstring.h"
|
||||
|
||||
|
@ -26,10 +26,10 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "system/filesys.h"
|
||||
#include "librpc/gen_ndr/security.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "librpc/gen_ndr/ndr_security.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
#include "system/filesys.h"
|
||||
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "lib/samba3/samba3.h"
|
||||
|
||||
#define TDB_FORMAT_STRING_V0 "ddddddBBBBBBBBBBBBddBBwdwdBwwd"
|
||||
|
@ -7,7 +7,7 @@ DESCRIPTION = Trivial Database Library
|
||||
OBJ_FILES = \
|
||||
common/tdb.o common/dump.o common/io.o common/lock.o \
|
||||
common/open.o common/traverse.o common/freelist.o \
|
||||
common/error.o common/transaction.o common/tdbutil.o
|
||||
common/error.o common/transaction.o
|
||||
CFLAGS = -Ilib/tdb/include
|
||||
PUBLIC_HEADERS = include/tdb.h
|
||||
#
|
||||
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
tdb utility functions
|
||||
Copyright (C) Andrew Tridgell 1999
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __TDBUTIL_H__
|
||||
#define __TDBUTIL_H__
|
||||
|
||||
#include "tdb.h"
|
||||
|
||||
/* single node of a list returned by tdb_search_keys */
|
||||
typedef struct keys_node
|
||||
{
|
||||
struct keys_node *prev, *next;
|
||||
TDB_DATA node_key;
|
||||
} TDB_LIST_NODE;
|
||||
|
||||
|
||||
TDB_LIST_NODE *tdb_search_keys(struct tdb_context*, const char*);
|
||||
void tdb_search_list_free(TDB_LIST_NODE*);
|
||||
int32_t tdb_change_int32_atomic(struct tdb_context *tdb, const char *keystr, int32_t *oldval, int32_t change_val);
|
||||
int tdb_lock_bystring(struct tdb_context *tdb, const char *keyval);
|
||||
void tdb_unlock_bystring(struct tdb_context *tdb, const char *keyval);
|
||||
int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
|
||||
BOOL tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32_t value);
|
||||
int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32_t v);
|
||||
BOOL tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *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);
|
||||
TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr);
|
||||
int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr);
|
||||
int tdb_unpack(struct tdb_context *tdb, char *buf, int bufsize, const char *fmt, ...);
|
||||
size_t tdb_pack(struct tdb_context *tdb, char *buf, int bufsize, const char *fmt, ...);
|
||||
|
||||
#endif /* __TDBUTIL_H__ */
|
@ -49,3 +49,13 @@ PUBLIC_DEPENDENCIES = XATTR
|
||||
#
|
||||
# End SUBSYSTEM WRAP_XATTR
|
||||
################################################
|
||||
|
||||
################################################
|
||||
# Start SUBSYSTEM UTIL_TDB
|
||||
[SUBSYSTEM::UTIL_TDB]
|
||||
PUBLIC_PROTO_HEADER = util_tdb.h
|
||||
OBJ_FILES = \
|
||||
util_tdb.o
|
||||
PUBLIC_DEPENDENCIES = LIBTDB
|
||||
# End SUBSYSTEM UTIL_TDB
|
||||
################################################
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
tdb utility functions
|
||||
|
||||
Copyright (C) Andrew Tridgell 1992-2005
|
||||
Copyright (C) Andrew Tridgell 1992-2006
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -19,17 +19,9 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/*
|
||||
NOTE: these utility functions are specific to Samba, and are not part
|
||||
of the core tdb code
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "system/glob.h"
|
||||
#include "system/wait.h"
|
||||
#include "system/filesys.h"
|
||||
#include "lib/util/dlinklist.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "pstring.h"
|
||||
|
||||
/* these are little tdb utility functions that are meant to make
|
@ -27,7 +27,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "messaging/messaging.h"
|
||||
#include "db_wrap.h"
|
||||
#include "lib/messaging/irpc.h"
|
||||
|
@ -1,4 +1,5 @@
|
||||
[SUBSYSTEM::SECRETS]
|
||||
PRIVATE_PROTO_HEADER = proto.h
|
||||
OBJ_FILES = secrets.o
|
||||
PRIVATE_DEPENDENCIES = DB_WRAP
|
||||
PRIVATE_DEPENDENCIES = DB_WRAP UTIL_TDB
|
||||
|
||||
|
@ -23,12 +23,13 @@
|
||||
such as the local SID and machine trust password */
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "secrets.h"
|
||||
#include "param/param.h"
|
||||
#include "system/filesys.h"
|
||||
#include "db_wrap.h"
|
||||
#include "lib/ldb/include/ldb.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "dsdb/samdb/samdb.h"
|
||||
|
||||
static struct tdb_wrap *tdb;
|
||||
|
@ -22,7 +22,8 @@
|
||||
#include "torture/torture.h"
|
||||
#include "system/filesys.h"
|
||||
#include "system/dir.h"
|
||||
#include "lib/tdb/include/tdbutil.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "lib/util/util_tdb.h"
|
||||
#include "libcli/libcli.h"
|
||||
#include "torture/util.h"
|
||||
#include "pstring.h"
|
||||
|
Loading…
Reference in New Issue
Block a user