summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tools
AgeCommit message (Collapse)AuthorFilesLines
2008-09-16Use single copy of tdb in both samba3 and samba4.Jelmer Vernooij5-1658/+0
2008-07-09Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"Michael Adam1-1/+1
This reverts commit fafb8ad2b81b9a46cf8259bedc1dca5023b06115. This fix is not valid: 1. convert_string() is not only used for key strings but also for data. 2. Some databases use string_tdb_data() i.e. non-null-terminated strings as keynames and others (like the one I was using), use string_term_tdb_data(), i.e. zero-terminated key strings. After discussion with Metze, the easiest (and proper way) to handle this is to specify key names as "keyname\0" for databases which use string_term_tdb_data(). Sorry for the noise... Michael (This used to be commit 17c012c4645f4e9542537c15f80d9b4e74304d11)
2008-07-08tdbtool: fix off-by-one error in argument length. (bug #2344)Michael Adam1-1/+1
This prevented all commands operating on keys (all non-traverse commands) in tdbtool to fail with a "fetch failed" or "delete failed" message. It seems that it fixes bug #2344 ... Apparently this bug was introduced with 94e53472666ed in 2005. Either nobody is using tdbtool or else tdb_find() has become more strict about the key legth in the meantime. :-) Michael (This used to be commit fafb8ad2b81b9a46cf8259bedc1dca5023b06115)
2008-01-18merged changes from v3-2-testAndrew Tridgell1-1/+1
(This used to be commit 7077df3e2e3f171532f6a5ac87d45201736c9c11)
2007-12-21r25893: Fix ldb, tdb builds (and one warning).Jeremy Allison1-1/+1
Jeremy. (This used to be commit 52b26645b04a9c5fb70e7b869b60c9157f821d50)
2007-12-21r25892: Keep the tdb code in sync between 3.2.x and 4.0.Jeremy Allison3-2/+55
Add in the alarm fix to allow locks to exit on alarm signal. Sync up the changes in tools. Jeremy. (This used to be commit cb6c663fa8818f49cc36f196bb5f4dea47edd69e)
2007-10-10r25001: Fix more C++ and other warnings, fix some of the indentation with ↵Jelmer Vernooij1-1/+1
ts=4 lines that I accidently added earlier. (This used to be commit 0bcb21ed740fcec0f48ad36bbc2deee2948e8fc7)
2007-10-10r23950: unlink before rename is superfluous.Michael Adam1-1/+0
Michael (This used to be commit dc0104be9acfcd97f95388029a421204723b641a)
2007-10-10r23925: Use NULL instead of 0 for a void * argument.Michael Adam1-1/+1
(This used to be commit bf7774360bbcf557e3cbc4ef0c45f750b4ba89c3)
2007-10-10r23853: Fix a very misleading error message in tdbbackup.Michael Adam1-1/+1
Michael (This used to be commit 1685057927e0ae37ed6be780ee0fb4b3bbefc00f)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell3-9/+6
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r22422: merged tdb changes from ctdbAndrew Tridgell1-1/+1
(This used to be commit a0ff739bcab32065d9d3957eb1d93f7791f84f04)
2007-10-10r22319: sync lib/tdb/ with samba3Stefan Metzmacher2-15/+228
metze (This used to be commit 8f24f6b38e967075589529a08c68a1a56f9f0499)
2007-10-10r22053: remove samba3 specific stuff from tdbtoolStefan Metzmacher1-77/+0
should I merge this to SAMBA_3_0? as it's also totally broken there, as the connection_struct definition is completely different metze (This used to be commit 5677b01d1dc63276a36daac400d5b0d935034ce6)
2007-10-10r22052: merge tdbtool from samba3 and build itStefan Metzmacher1-251/+395
metze (This used to be commit f471e752161e392ef7324df30517af1818a27d1d)
2007-10-10r19960: Add code to check for loops in the free list.Jeremy Allison1-2/+7
Should help us validate tdb's against corruption. Jeremy. (This used to be commit bd0710fa09799cb496b1f9f365c57c3b542445f3)
2007-10-10r18129: moved the system includes into libreplace - this gives much moreAndrew Tridgell4-87/+5
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) (This used to be commit 77d1a468e06290aba789e2f3affc769fc5159a21)
2007-10-10r17781: fix compiler warningStefan Metzmacher1-3/+1
metze (This used to be commit bbe641f23676961972ac337304ece1116b0219b6)
2007-10-10r17737: fixed a 'declaration in code' errorAndrew Tridgell1-1/+2
(This used to be commit aca417c6b164b54334cc46e126dd362ddab509d3)
2007-10-10r16938: Fix breakage of TDB on VOS (declaration after statement)Andrew Bartlett1-1/+2
Andrew Bartlett (This used to be commit d0ed7cd241e0e7889406f62fd620d8fe39d4498c)
2007-10-10r16917: Fix compile errors found by the testing of tdb on the build farm.Andrew Bartlett1-3/+9
Andrew Bartlett (This used to be commit a6e0846d9b5f1adc2ff137247a5c3f32746e43b5)
2007-10-10r16916: Implement metze's proposed changes to the tdb logging API.Andrew Bartlett2-2/+8
This clearly links the log function with its private pointer, and makes the argument list for tdb_open_ex a bit shorter. Andrew Bartlett (This used to be commit 5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
2007-10-10r16774: This patch modifies the tdb API to allow the logging function to be usedAndrew Bartlett2-8/+8
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 (This used to be commit 58898092c1ce043f6d698db5065f372b79109e22)
2007-10-10r15573: Fix build of systems that have iconv headers in non-standard locationsJelmer Vernooij1-1/+1
Split of system/locale.h header from system/iconv.h Previously, iconv wasn't being used on these systems (This used to be commit aa6d66fda69779d1c2948a1aca85dbd5208f1cba)
2007-10-10r15100: Port the bugfix for #3569 to Samba4Volker Lendecke1-1/+1
(This used to be commit 5f1d52f232051324082b840f29dd7719a9328bd5)
2007-10-10r10475: make sure we report failures in tdbtorture (ie. get the exit status ↵Andrew Tridgell1-1/+1
right) (This used to be commit a795fc0aa141c08af6e37af07c88164bad3db35b)
2007-10-10r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don'tAndrew Tridgell1-1/+1
have it. Overestimating is harmless. (This used to be commit ab953c8c72060c496876b6f39d388ad2f7e3c7e0)
2007-10-10r10470: solaris8 has a problem with tdbtorture with 3 processes. To see ifAndrew Tridgell1-1/+1
this is just a solaris issue this patch changes the default to 3, and I'll see how many build farm boxes break (This used to be commit c85836bafc9c042deac2a02ef6fddbfeaa5f47f1)
2007-10-10r10468: - terminate tdbtorture quickly when an error is detectedAndrew Tridgell1-23/+41
- more workarounds for aix not handling malloc of size 0 (This used to be commit c2b1739c6389503854f55fa8407c55071781eff4)
2007-10-10r10463: consider it an error if tdbtorture produces any log messagesAndrew Tridgell1-1/+10
(This used to be commit d9ee0e8b59ee52ed1e41865cffe97e32b504e7e7)
2007-10-10r10459: fixed some portability problemsAndrew Tridgell1-0/+3
(This used to be commit 03942dd54b31e7a4cf9c6270b26ccf68a3234b40)
2007-10-10r10421: following on discussions with simo, I have worked out a way ofAndrew Tridgell1-1/+9
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 (This used to be commit 7dd31288a701d772e45b1960ac4ce4cc1be782ed)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell2-41/+114
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. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10330: Add SConscript to more subsystems. Some of the tdb tools build now.Jelmer Vernooij1-1/+1
Start on custom Samba scons tools (for handling proto generation, pidl, etc) (This used to be commit 4bffe4435944fffa3f9680b5a2fe63f2bdd98003)
2007-10-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell4-30/+30
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. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r8448: - added a test target for tdbAndrew Tridgell1-2/+4
- reduced the torture size so it doesn't kill the build farm hosts (This used to be commit 7a88a9f06cbe5c125edad0da7908b94bcedfe4fc)
2007-10-10r5330: Remove #include <sys/time.h> from includes.h.Andrew Bartlett1-0/+1
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 (This used to be commit 34b1da730304bed7fee5bae7cbde7fbccecb6af5)
2007-10-10r5300: more uint32 and system/filesys.h build fixes when developer mode is ↵Andrew Tridgell1-0/+1
enabled (This used to be commit 93931b1a741a3722c311ada80c4c9d3d670f91b2)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell2-0/+2
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. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell3-0/+3
- 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? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r4467: - tdb standalone build doesn't need -DSTANDALONE any moreAndrew Tridgell1-1/+1
- fixed standalone build (This used to be commit ade0b71e4194f99d807d26276592bc041d46df7b)
2007-10-10r4466: rather than defining "STANDALONE" for building tdb, ldb and tallocAndrew Tridgell4-4/+4
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba build. This makes it easier to pull code out of Samba for external use. (This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
2007-10-10r3968: fix compiler warningsStefan Metzmacher1-1/+1
metze (This used to be commit 6440476f7f2fd5776ec4a21240e7482603000d19)
2007-10-10r3461: another place where "open" was used as a structure elementAndrew Tridgell1-0/+1
(This used to be commit 1087ea830e7aead86d54a1836512e88554afc919)
2007-10-10r3449: more include file reductionAndrew Tridgell1-0/+1
the ldb part isn't ideal, I will have to think of a better solution (This used to be commit 6b1f86aea8427a8e957b1aeb0ec2f507297f07cb)
2007-10-10r3447: more include/system/XXX.h include filesAndrew Tridgell1-0/+1
(This used to be commit 264ce9181089922547e8f6f67116f2d7277a5105)
2007-10-10r3445: made the gtk tooks use minimal includes. This approximately halves theAndrew Tridgell1-1/+1
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 (This used to be commit 8ebd20cf551c8c1fad98ec723d91873fa202b85a)
2007-10-10r3421: got rid of some unused codeAndrew Tridgell1-30/+0
(This used to be commit 0333f417a86a54a328ca9bd908076f9fe8405dc7)
2007-10-10r2092: fix the build(don't catch main() by make proto)Stefan Metzmacher2-2/+2
metze (This used to be commit ecdb0b442659e80ca91d5ec5b505224c68a97c5a)
2007-10-10r2088: add tdbtorture tdbdump and tdbtest to the buildStefan Metzmacher3-17/+43
NOTE: tdbbackup and tdbtool seems to be broken... NOTE: I also added SMB_EXT_LIB(GDBM,...) because that is needed by tdbtest metze (This used to be commit e66630662d4203ccecbb20962e83dbf50a2c056f)