1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-01 16:23:49 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Jeremy Allison
52b26645b0 r25893: Fix ldb, tdb builds (and one warning).
Jeremy.
2007-12-21 05:44:42 +01:00
Jeremy Allison
cb6c663fa8 r25892: Keep the tdb code in sync between 3.2.x and 4.0.
Add in the alarm fix to allow locks to exit on
alarm signal.
Sync up the changes in tools.
Jeremy.
2007-12-21 05:44:42 +01:00
Jelmer Vernooij
0bcb21ed74 r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier. 2007-10-10 15:05:28 -05:00
Michael Adam
dc0104be9a r23950: unlink before rename is superfluous.
Michael
2007-10-10 15:01:10 -05:00
Michael Adam
bf7774360b r23925: Use NULL instead of 0 for a void * argument. 2007-10-10 15:01:10 -05:00
Michael Adam
1685057927 r23853: Fix a very misleading error message in tdbbackup.
Michael
2007-10-10 15:01:04 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Andrew Tridgell
a0ff739bca r22422: merged tdb changes from ctdb 2007-10-10 14:51:17 -05:00
Stefan Metzmacher
8f24f6b38e r22319: sync lib/tdb/ with samba3
metze
2007-10-10 14:51:01 -05:00
Stefan Metzmacher
5677b01d1d r22053: remove samba3 specific stuff from tdbtool
should I merge this to SAMBA_3_0? as it's also totally
broken there, as the connection_struct definition is completely
different

metze
2007-10-10 14:49:46 -05:00
Stefan Metzmacher
f471e75216 r22052: merge tdbtool from samba3 and build it
metze
2007-10-10 14:49:46 -05:00
Jeremy Allison
bd0710fa09 r19960: Add code to check for loops in the free list.
Should help us validate tdb's against corruption.
Jeremy.
2007-10-10 14:28:40 -05:00
Andrew Tridgell
77d1a468e0 r18129: moved the system includes into libreplace - this gives much more
isolation of our portability environment from the main code, and also
simplifies the includes system (no separate #ifdef _SAMBA_BUILD for
tdb. ldb etc now)
2007-10-10 14:17:36 -05:00
Stefan Metzmacher
bbe641f236 r17781: fix compiler warning
metze
2007-10-10 14:16:41 -05:00
Andrew Tridgell
aca417c6b1 r17737: fixed a 'declaration in code' error 2007-10-10 14:16:34 -05:00
Andrew Bartlett
d0ed7cd241 r16938: Fix breakage of TDB on VOS (declaration after statement)
Andrew Bartlett
2007-10-10 14:10:02 -05:00
Andrew Bartlett
a6e0846d9b r16917: Fix compile errors found by the testing of tdb on the build farm.
Andrew Bartlett
2007-10-10 14:10:00 -05:00
Andrew Bartlett
5d5503e8d8 r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and
makes the argument list for tdb_open_ex a bit shorter.

Andrew Bartlett
2007-10-10 14:09:59 -05:00
Andrew Bartlett
58898092c1 r16774: This patch modifies the tdb API to allow the logging function to be used
as part of ldb.

This allows tdb failures to be passed all the way up to Samba's DEBUG
system, which allowed easier debugging.

Unfortunately I had to extend the tdb API, as the logging function
didn't have a context pointer.

I've worked over the 'debug levels' in TDB.  Most of them were 0,
which didn't seem right, as some were trace-like messages.  We didn't
see any of these previously, except when accessing TDB directly.

Andrew Bartlett
2007-10-10 14:09:45 -05:00
Jelmer Vernooij
aa6d66fda6 r15573: Fix build of systems that have iconv headers in non-standard locations
Split of system/locale.h header from system/iconv.h

Previously, iconv wasn't being used on these systems
2007-10-10 14:05:58 -05:00
Volker Lendecke
5f1d52f232 r15100: Port the bugfix for #3569 to Samba4 2007-10-10 14:04:09 -05:00
Andrew Tridgell
a795fc0aa1 r10475: make sure we report failures in tdbtorture (ie. get the exit status right) 2007-10-10 13:38:51 -05:00
Andrew Tridgell
ab953c8c72 r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don't
have it. Overestimating is harmless.
2007-10-10 13:38:51 -05:00
Andrew Tridgell
c85836bafc r10470: solaris8 has a problem with tdbtorture with 3 processes. To see if
this is just a solaris issue this patch changes the default to 3, and
I'll see how many build farm boxes break
2007-10-10 13:38:51 -05:00
Andrew Tridgell
c2b1739c63 r10468: - terminate tdbtorture quickly when an error is detected
- more workarounds for aix not handling malloc of size 0
2007-10-10 13:38:50 -05:00
Andrew Tridgell
d9ee0e8b59 r10463: consider it an error if tdbtorture produces any log messages 2007-10-10 13:38:49 -05:00
Andrew Tridgell
03942dd54b r10459: fixed some portability problems 2007-10-10 13:38:48 -05:00
Andrew Tridgell
7dd31288a7 r10421: following on discussions with simo, I have worked out a way of
allowing searches to proceed while another process is in a
transaction, then only upgrading the transaction lock to a write lock
on commit.

The solution is:

 - split tdb_traverse() into two calls, called tdb_traverse() and
   tdb_traverse_read(). The _read() version only gets read locks, and
   will fail any write operations made in the callback from the
   traverse.

 - the normal tdb_traverse() call allows for read or write operations
   in the callback, but gets the transaction lock, preventing
   transastions from starting inside the traverse

In addition we enforce the following rule that you may not start a
transaction within a traverse callback, although you can start a
traverse within a transaction

With these rules in place I believe all the deadlock possibilities are
removed, and we can now allow for searches to happen in parallel with
transactions
2007-10-10 13:38:44 -05:00
Andrew Tridgell
06bd8abba9 r10405: added transactions into tdb, and hook them into ldb. See my
samba-technical posting for more details on the transactions design.

This also adds a number of command line arguments to tdbtorture,
making it more flexible, and fixes some lock deadlock conditions in
the tdbtorture code.
2007-10-10 13:38:41 -05:00
Jelmer Vernooij
4bffe44359 r10330: Add SConscript to more subsystems. Some of the tdb tools build now.
Start on custom Samba scons tools (for handling proto generation, pidl, etc)
2007-10-10 13:38:28 -05:00
Andrew Tridgell
4673cdd0d2 r10253: a fairly large tdb cleanup and re-organise. Nearly all of this change
just involves splitting up the core tdb.c code into separate files on
logical boundaries, but there are some minor functional changes as well:

 - move the 'struct tdb_context' into tdb_private.h, hiding it from
   users. This was done to allow the structure to change without
   breaking code that uses tdb.

 - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to
   access the elements of struct tdb_context that were used by
   external code but are no longer visible

 - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just
   as good due to the way tdb locks work

 - changed some of the types (such as tdb_off to tdb_off_t) to make
   syntax highlighting work better

 - removed the old optional spinlock code. It was a bad idea.

 - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes
   fail or report nasty looking errors. This is the only real bug
   fixed in this commit. Jeremy/Jerry, you might like to pickup this
   change for Samba3, as that could definately affect smbd in
   Samba3.

The aim of all of these changes is to make the tdb
transactions/journaling code I am working on easier to write. I
started to write it on top of the existing tdb.c code and it got very
messy. Splitting up the code makes it much easier to follow.

There are more cleanups we could do in tdb, such as using uint32_t
instead of u32 (suggested by metze). I'll leave those for another day.
2007-10-10 13:38:12 -05:00
Andrew Tridgell
7a88a9f06c r8448: - added a test target for tdb
- reduced the torture size so it doesn't kill the build farm hosts
2007-10-10 13:23:04 -05:00
Andrew Bartlett
34b1da7303 r5330: Remove #include <sys/time.h> from includes.h.
Add #include "system/time.h" back (it was removed in some of these
places because the definitions were provided by <sys/time.h> on tridge's
platform.)

Andrew Bartlett
2007-10-10 13:09:43 -05:00
Andrew Tridgell
93931b1a74 r5300: more uint32 and system/filesys.h build fixes when developer mode is enabled 2007-10-10 13:09:39 -05:00
Andrew Tridgell
9db6c79e90 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
2007-10-10 13:09:38 -05:00
Andrew Tridgell
6f79432fe6 r5296: - only include the tdb headers where they are needed
- removed the u32 hack in events.c as I think this was only needed as
  tdb.h defines u32. Metze, can you check that this hack is indeed no
  longer needed on your suse system?
2007-10-10 13:09:38 -05:00
Andrew Tridgell
ade0b71e41 r4467: - tdb standalone build doesn't need -DSTANDALONE any more
- fixed standalone build
2007-10-10 13:07:54 -05:00
Andrew Tridgell
09e98c8745 r4466: rather than defining "STANDALONE" for building tdb, ldb and talloc
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba
build. This makes it easier to pull code out of Samba for external
use.
2007-10-10 13:07:54 -05:00
Stefan Metzmacher
6440476f7f r3968: fix compiler warnings
metze
2007-10-10 13:06:09 -05:00
Andrew Tridgell
1087ea830e r3461: another place where "open" was used as a structure element 2007-10-10 13:05:16 -05:00
Andrew Tridgell
6b1f86aea8 r3449: more include file reduction
the ldb part isn't ideal, I will have to think of a better solution
2007-10-10 13:05:13 -05:00
Andrew Tridgell
264ce91810 r3447: more include/system/XXX.h include files 2007-10-10 13:05:12 -05:00
Andrew Tridgell
8ebd20cf55 r3445: made the gtk tooks use minimal includes. This approximately halves the
total include lines in compiling C files in Samba (the .gch file is
now 5M instead of 12M)

This also gets rid of the silly gtk compile warning for non-gtk code
2007-10-10 13:05:12 -05:00
Andrew Tridgell
0333f417a8 r3421: got rid of some unused code 2007-10-10 13:05:08 -05:00
Stefan Metzmacher
ecdb0b4426 r2092: fix the build(don't catch main() by make proto)
metze
2007-10-10 12:58:24 -05:00
Stefan Metzmacher
e66630662d r2088: add tdbtorture tdbdump and tdbtest to the build
NOTE: tdbbackup and tdbtool seems to be broken...

NOTE: I also added SMB_EXT_LIB(GDBM,...)
      because that is needed by tdbtest

metze
2007-10-10 12:58:24 -05:00
Stefan Metzmacher
4c1c9f59cc r990: fix tdb standalone build
metze
2007-10-10 12:56:25 -05:00
Stefan Metzmacher
b5378803fd r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
e3191b54ea r849: move tdb/tools/Makefile to tdb/Makefile.tdb
like in ldb

also fix the makefile to let it compile the tools fine

metze
2007-10-10 12:56:11 -05:00
Stefan Metzmacher
bacab322ce r848: convert lib/tdb into the same layout as lib/ldb
metze
2007-10-10 12:56:02 -05:00