1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

661 Commits

Author SHA1 Message Date
Rusty Russell
a6e0ef87d2 tdb: make _tdb_transaction_cancel static.
Now tdb_open() calls tdb_transaction_cancel() instead of
_tdb_transaction_cancel, we can make it static.

Signed-off-by: Rusty Russell<rusty@rustcorp.com.au>
2010-02-24 10:39:59 +10:30
Rusty Russell
452b4a5a6e tdb: cleanup: split brlock and brunlock methods.
This is taken from the CCAN code base: rather than using tdb_brlock for
locking and unlocking, we split it into brlock and brunlock functions.

For extra debugging information, brunlock says what kind of lock it is
unlocking (even though fnctl locks don't need this).  This requires an
extra argument to tdb_transaction_unlock() so we know whether the
lock was upgraded to a write lock or not.

We also use a "flags" argument tdb_brlock:
1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW).
2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype.
3) TDB_LOCK_PROBE replaces the "probe" argument.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-17 12:17:19 +10:30
Brad Hards
09e756b1d6 Spelling fixes for tdb.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:31 +01:00
Andrew Tridgell
1373e748aa tdb: use fdatasync() instead of fsync() in transactions
This might help on some filesystems
2010-02-13 22:36:11 +11:00
Volker Lendecke
6824c6f46b tdb: Apply some const, just for clarity 2010-02-13 12:19:09 +01:00
Rusty Russell
b37b452cb8 tdb: fix recovery reuse after crash
If a process (or the machine) dies after just after writing the
recovery head (pointing at the end of file), the recovery record will filled
with 0x42.  This will not invoke a recovery on open, since rec.magic
!= TDB_RECOVERY_MAGIC.

Unfortunately, the first transaction commit will happily reuse that
area: tdb_recovery_allocate() doesn't check the magic.  The recovery
record has length 0x42424242, and it writes that back into the
now-valid-looking transaction header) for the next comer (which
happens to be tdb_wipe_all in my tests).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-10 16:56:14 +10:30
Rusty Russell
6269cdcd15 tdb: give a name to the invalid recovery area constant (0)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-10 16:56:13 +10:30
Simo Sorce
6339de7f4f release-scripts: parametrize scripts
This should make it easier to keep all release scripts alined as it will reduce
the difference between them to ideally a few variables

Also moves the tdb script in the scripts directory.
2010-02-08 10:29:06 -05:00
Simo Sorce
70534adee1 tdb: raise version to 1.2.1
after recent fixes we need to raise the version to 1.2.1 so that
we can require also the right patched version.
2010-02-06 10:48:39 -05:00
Volker Lendecke
531059696e tdb: fix an early release of the global lock that can cause data corruption
There was a bug in tdb where the

                tdb_brlock(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1);

(ending the transaction-"mutex") was done before the

                        /* remove the recovery marker */

This means that when a transaction is committed there is a window where another
opener of the file sees the transaction marker while the transaction committer
is still fully functional and working on it. This led to transaction being
rolled back by that second opener of the file while transaction_commit() gave
no error to the caller.

This patch moves the F_UNLCK to after the recovery marker was removed, closing
this window.
2010-02-01 15:06:29 +01:00
Stefan Metzmacher
c01f443ebc tdb: fix standalone 'make installdocs'
metze
2010-01-06 14:43:39 +01:00
Brian Lu
0a3a6bb8f9 tdb: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug.cgi?id=6991 for details
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-06 14:27:50 +01:00
Jelmer Vernooij
0110990f01 tdb: Also build and install tdb manpages from standalone tdb. 2009-12-21 23:40:12 +01:00
Jelmer Vernooij
8b278e6dc1 tdb: Fix formatting of API check file. 2009-12-21 23:40:12 +01:00
Günther Deschner
a23084e1e8 tdbtool: avoid using c++ reserved words.
Guenther
2009-12-17 15:40:42 +01:00
Simo Sorce
4334092cba Fix release script with newer versins of git 2009-12-07 09:25:03 -05:00
Matthias Dieter Wallnöfer
9776cb0345 tdb tools: Mostly cosmetic adaptions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-20 16:50:48 +01:00
Stefan Metzmacher
5ca0a4bfd6 tdb: change version to 1.2.0 after adding TDB_*ALLOW_NESTING
metze
2009-11-20 09:45:43 +01:00
Stefan Metzmacher
3b9f19ed91 tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior
We need to keep TDB_ALLOW_NESTING as default behavior,
so that existing code continues to work.

However we may change the default together with a major version
number change in future.

metze
2009-11-20 09:45:36 +01:00
Ronnie Sahlberg
436b55db1f New attempt at TDB transaction nesting allow/disallow.
Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING.

If an application can cope with transaction nesting and the implicit
semantics of tdb_transaction_commit(), it can enable transaction nesting
by using the TDB_ALLOW_NESTING flag.
(cherry picked from ctdb commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-20 09:45:34 +01:00
Stefan Metzmacher
85449b7bcc tdb: always set tdb->tracefd to -1 to be safe on goto fail
metze
2009-11-20 09:45:34 +01:00
Volker Lendecke
be88a126ea tdb: Fix a C++ warning 2009-11-08 00:28:22 +01:00
Kirill Smelkov
83de5c8263 tdb: update README a bit
While studying tdb, I've noticed a couple of mismatches between readme
and actual code:

- tdb_open_ex changed it's log_fn argument to log_ctx
- there is now no tdb_update(), which it seems was transformed into
  non-exported tdb_update_hash()

There were other mismatches, but I don't remember them now, sorry.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29 10:14:34 +10:30
Kirill Smelkov
71a21393dd tdb: add tests for double .close() in pytdb
The reason I do it is that when using older python-tdb as shipped in
Debian Lenny, python interpreter crashes on this test:

    (gdb) bt
    #0  0xb7f8c424 in __kernel_vsyscall ()
    #1  0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6
    #2  0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6
    #3  0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6
    #4  0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6
    #5  0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6
    #6  0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1
    #7  0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so
    #8  0x0a038d08 in ?? ()
    #9  0x00000000 in ?? ()

master's pytdb does not (we have a check for self->closed in obj_close()),
but still...

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29 10:14:33 +10:30
Kirill Smelkov
b4424f8234 tdb: reset tdb->fd to -1 in tdb_close()
So that erroneous double tdb_close() calls do not try to close() same
fd again. This is like SAFE_FREE() but for fd.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29 10:14:33 +10:30
Kirill Smelkov
cfed5f946d tdb: fix typo in python's Tdb.get() docstring
It's Tdb.get(), not Tdb.fetch().

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29 10:14:33 +10:30
Kirill Smelkov
ecbe5ebd8d tdb: kill last bits from swig
We no longer use swig for pytdb, so there is no need for swig make
rules. Also pytdb.c header should be updated.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-29 10:14:33 +10:30
Andrew Tridgell
d4c0e8fdf0 tdb: detect tdb store of identical records and skip
This can help with ldb where we rewrite the index records
2009-10-25 13:15:18 +11:00
Stefan Metzmacher
3b62e250c0 tdb: rename 'struct list_struct' into 'struct tdb_record'
metze
2009-10-23 18:27:20 +02:00
Rusty Russell
0944931159 lib/tdb: make tdbtool use tdb_check() for "check" command
Also, set logging function so we get more informative messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:11:34 +10:30
Rusty Russell
022b4d4aa6 lib/tdb: add tdb_check()
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains.  tdb_check() provides this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:10:34 +10:30
Rusty Russell
0fc6800005 lib/tdb: add -t (always use transactions) option to tdbtorture
This means you can kill it at any time and expect no corruption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:10:54 +10:30
Rusty Russell
b77f41d58b lib/tdb: wean off TDB_ERRCODE.
It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
Also, we should never set errno, as io.c was doing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:09:43 +10:30
Rusty Russell
703004340c lib/tdb: TDB_TRACE support (for developers)
When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled.
This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb.

The majority of this patch comes from moving internal functions to _<funcname> to
avoid double-tracing.  There should be no additional overhead for the normal (!TDB_TRACE)
case.

Note that the verbose traces compress really well with rzip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:00:12 +10:30
Andrew Tridgell
5dcf0069b6 tdb: fixed the intermittent failure of tdbtorture in the build farm
There was a race condition that caused the torture.tdb to be left in a
state that needed recovery. The torture code thought that any message
from the tdb code was an error, so the "recovered" message, which is a
TDB_DEBUG_TRACE message, marked the run as being an error when it
isn't.
2009-10-20 10:59:40 +11:00
Michael Adam
e440a2e11e tdb:tdbtool: fix indentation.
Michael
2009-09-21 17:47:51 +02:00
Michael Adam
91e1bab2e9 tdb:tdbtool: add transaction_start/_commit/_cancel commands.
So one can perform tdbtool operations protected by transactions.

Michael
2009-09-21 17:47:51 +02:00
Michael Adam
817383d88d tdb:tdbtool: add the "speed" command to the help text.
Michael
2009-09-21 17:47:51 +02:00
Andrew Tridgell
9c69795626 tdb: increase minor version
we depend on reads in transactions for s4 replication
2009-09-19 14:12:00 -07:00
Andrew Tridgell
46c99ec2a3 tdb: allow reads after prepare commit
We previously only allowed a commit to happen after a prepare
commit. It is in fact safe to allow reads between a prepare and a
commit, and the s4 replication code can make use of that, so allow it.
2009-09-15 14:04:22 -07:00
Michael Adam
55dcf928eb tdb:mksigs: allow PRINTF_ATTRIBUTE(..) macros function types as funcion args
Michael
2009-09-11 15:31:31 +02:00
Michael Adam
cfa4e7ec75 tdb:mksigs: normalize bool -> _Bool
Michael
2009-09-11 15:31:31 +02:00
Michael Adam
25939a627f tdb:mksigs: ignore symbols (like _DEPRECATED_) after closing function parentheses
Michael
2009-09-11 15:31:30 +02:00
Michael Adam
13bfcd5a93 tdb:mksigs: correctly ignode multiline function typedefs
by first concatenating multilint parentheses and removing typefes afterwards.

Michael
2009-09-11 15:31:30 +02:00
Michael Adam
ecd12bfb38 tdb:mksigs: ignore struct forward declarations.
Michael
2009-09-11 15:31:30 +02:00
Michael Adam
400f08450b tdb:mksyms: allow characters after closing functions parenthesis.
Michael
2009-09-11 15:31:29 +02:00
Michael Adam
907e05595f tdb:mksyms: allow double pointer return value of functions.
Michael
2009-09-11 15:31:29 +02:00
Günther Deschner
1c2f4919ab tdb: fix c++ build warning.
Guenther
2009-09-07 11:57:10 +02:00
Michael Adam
0d120be36b One would expect I could spell my name... 2009-08-30 00:56:04 +02:00
Michael Adam
84446a2407 tdb: move the original abi_checks script to script/abi_checks_gcc.sh
Michael
2009-08-30 00:51:55 +02:00
Michael Adam
f7c473f534 tdb: run abi_checks as part of "make test".
Strange: I had to place "test:: abi_checks" before the main
"test::" target here, otherwise the abi checks would not get run.

Michael
2009-08-30 00:51:55 +02:00
Michael Adam
dff3f37cf1 tdb: remove files generated by "make abi_checks" in "make clean".
Michael
2009-08-30 00:51:55 +02:00
Michael Adam
e21ecfc563 tdb: add a target "abi_checks" to tdb.
Simply run "make abi_checks" to call the abi check script appropriately.

Michael
2009-08-30 00:51:54 +02:00
Michael Adam
9636e0d373 tdb: add script/abi_checks.sh. check for abi changes without gcc magic.
USAGE: abi_checks.sh LIBRARY_NAME header1 [header2 ...]

This creates symbol signature lists using the mksyms and mksigs scripts
and compares them with the checked in lists.

Michael
2009-08-30 00:51:54 +02:00
Michael Adam
0760a04ef9 tdb: add script to extract signatures from header files.
This produces output like the output gcc produces when
invoked with the -aux-info switch.

Run like this: cat include/tdb.h | ./script/mksigs.pl

This simple parser is probably too coarse to handle all
possible header files, but it treats tdb.h correctly...

Michael
2009-08-30 00:51:54 +02:00
Michael Adam
006fd0c43c tdb: add scripts to extract library symbols (exports file) from headers
Michael
2009-08-30 00:51:53 +02:00
Rusty Russell
398d0c2929 lib/tdb: don't overwrite TDBs with different version numbers.
In future, this may happen, and we don't want to clobber them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-08-28 13:43:05 +10:00
Jeremy Allison
4fc9f9c3f9 Add define guards around otherwise unused variable.
Jeremy.
2009-08-06 11:47:08 -07:00
Rusty Russell
252f7da702 There is one signedness issue in tdb which prevents traverses of TDB records
over the 2G offset on systems which support 64 bit file offsets.  This fixes
that case.

On systems with 32 bit offsets, expansion and fcntl locking on these records
will fail anyway.  SAMBA already does '#define _FILE_OFFSET_BITS 64' in
config.h (on my 32-bit x86 Linux system at least) to get 64 bit file offsets.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-08-06 13:13:42 +10:00
Rusty Russell
a207cca1d3 tdb: don't alter tdb->flags in tdb_reopen_all()
The flags are user-visible, via tdb_get_flags/add_flags/remove_flags.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-07-31 14:40:28 +02:00
Rusty Russell
3b2f074bda tdb: Reimplementation of Metze's "lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop".
This version just wraps the reopen code, so we still re-grab the lock and do
the normal sanity checks.

The reason we do this at all is to avoid global fd limits, see:
http://forums.fedoraforum.org/showthread.php?t=210393

Note also that this whole reopen concept is fundamentally racy: if the parent
goes away before the child calls tdb_reopen_all, the database can be left
without an active lock and another TDB_CLEAR_IF_FIRST opener will clear it.
A fork_with_tdbs() wrapper could use a pipe to solve this, but it's hardly
elegant (what if there are other independent things which have similar needs?).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-07-31 14:40:28 +02:00
Rusty Russell
fa91bc6719 tdb: Revert "lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop"
This reverts commit e17df483fb.

tdb_reopen_all also restores the active lock, required for TDB_CLEAR_IF_FIRST.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-07-31 14:40:28 +02:00
Rusty Russell
36c0f0f99a realloc() has that horrible overloaded free semantic when size is 0:
current code does a free of the old record in this case, then fail.
2009-07-30 13:10:33 -07:00
Rusty Russell
a88c281ddc If the record is at the end of the database, pretending it has length 1
might take us out-of-bounds.  Only pretend to be length 1 for the malloc.
2009-07-30 13:09:33 -07:00
Rusty Russell
760104188d tdb: fix locking error
54a51839ea "Make tdb transaction lock
recursive (samba version)" was broken: I "cleaned it up" and prevented
it from ever unlocking.

To see the problem:
	$ bin/tdbtorture -s 1248142523
	tdb_brlock failed (fd=3) at offset 8 rw_type=1 lck_type=14 len=1
	tdb_transaction_lock: failed to get transaction lock
	tdb_transaction_start failed: Resource deadlock avoided

My testcase relied on the *count* being correct, which it was.  Fixing that
now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
2009-07-21 10:21:53 +02:00
Rusty Russell
54a51839ea Make tdb transaction lock recursive (samba version)
This patch replaces 6ed27edbcd and
1a416ff13c, which fixed the bug where traversals
inside transactions would release the transaction lock early.

This solution is more general, and solves the more minor symptom that nested
traversals would also release the transaction lock early.  (It was also suggestd in
Volker's comment in 6ed27ed).

This patch also applies to ctdb, if the traverse.c part is removed (ctdb's tdb
code never received the previous two fixes).

Tested using the testsuite from ccan (adapted to the samba code).  Thanks to
Michael Adam for feedback.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
2009-07-20 22:17:20 +02:00
Björn Jacke
cdf025f012 tdb: fix define of tdbdir when srcdir != "." 2009-07-03 18:24:42 +02:00
Simo Sorce
7119241c0d Sort the signature files 2009-07-03 08:45:30 -04:00
Jelmer Vernooij
43b7a0e34e tdb: Fix help string in configure flag to enable Python bindings. 2009-06-17 21:12:50 +02:00
Simo Sorce
ac1d311e9c fix release scripts to always git clean
This makes sure we do not include foreign object files or other
build byproducts by mistake.
2009-06-17 14:18:03 -04:00
Simo Sorce
7aee9f92e7 Add exports file and abi checker for tdb
This is a first attempt at exporting symbols only for public functions
We also provide a rudimentary ABI checker that tries to check that
function signatures are not changed by mistake.
Given our use of macros this is not an API checker.
It's all based on tdb.h contents and the gcc -aux-info option
2009-06-15 16:31:12 -04:00
Simo Sorce
57ba31ca96 Add option to --disable-python on build 2009-06-15 16:31:11 -04:00
Slava Semushin
497b9e460b lib/tdb/tools/tdbtorture.c: fixed memory leak.
Found by cppcheck:
[lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
2009-06-06 22:33:39 +02:00
Andrew Tridgell
a6cc04a200 overallocate all records by 25%
This greatly reduces the fragmentation of databases where records
tend to grow slowly by a small amount each time. The case where this
is most seen is the ldb index records. Adding this overallocation
reduced the size of the resulting database by more than 20x when
running a test that adds 10k users.
2009-06-01 13:13:07 +10:00
Andrew Tridgell
a386173fa1 auto-repack in transactions that expand the tdb
The idea behind this is to recover from badly fragmented free
lists. Choosing the point where the file expands is fairly arbitrary,
but seems to work well.
2009-06-01 13:11:39 +10:00
Andrew Tridgell
08be1420ba fixed tdbbackup to give tdb error messages 2009-05-28 17:35:12 +10:00
Andrew Tridgell
5ab03dbecc Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-05-28 16:12:34 +10:00
Andrew Tridgell
4b4fec65db make TDB_NOSYNC affect all the fsync/msync calls in transactions
During a transaction commit tdb normally uses fsync/msync calls to
make it crash safe. This can be disabled using the TDB_NOSYNC flag,
but it wasn't disabling all the code paths that caused a fsync/msync.
2009-05-28 16:08:28 +10:00
Tim Prouty
c299833bf8 tdb: Fix some recently introduced warnings in tdbtool 2009-05-27 13:18:12 -07:00
Andrew Tridgell
e15027155d added some more speed tests to tdbtool
This adds 3 simple speed tests to tdbtool, for transaction store,
store and fetch.

On my laptop this shows transactions costing about 10ms
2009-05-26 09:24:37 +10:00
Jim McDonough
a91bcbccf8 Detect tight loop in tdb_find() 2009-05-21 16:29:48 -04:00
Jelmer Vernooij
6230eb94af Update copies of config.guess and config.sub. 2009-05-16 04:03:12 +02:00
Simo Sorce
d52172654c Update tdb and talloc web pages 2009-05-05 19:04:39 -04:00
Simo Sorce
b58abb262c Add release scripts for talloc and tdb 2009-05-05 09:51:00 -04:00
Tim Prouty
42c0931441 tdb: Remove unused variable 2009-03-31 16:24:07 -07:00
Andrew Tridgell
7a5e6940cf up the version to 1.1.4 with the addition of
tdb_transaction_prepare_commit()
2009-03-31 15:06:23 +11:00
Andrew Tridgell
84547b8dba added basic testing of tdb_transaction_prepare_commit() in tdbtorture 2009-03-31 13:59:03 +11:00
Howard Chu
b90863c0b7 Add tdb_transaction_prepare_commit()
Using tdb_transaction_prepare_commit() gives us 2-phase commits. This
allows us to safely commit across multiple tdb databases at once, with
reasonable transaction semantics

Signed-off-by: tridge@samba.org
2009-03-31 13:15:54 +11:00
Stefan Metzmacher
e17df483fb lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop
The reason for tdb_reopen_all() is that the seek pointer on fds are shared between
parent and child.

metze
2009-02-25 13:57:11 -08:00
Stefan Metzmacher
e6bb55c3d5 lib/tdb: don't generate a static library for the samba4 build
We also don't do this for talloc and ldb.

metze
2009-02-03 10:24:38 +01:00
Stefan Metzmacher
662e05f7a9 lib/tdb: the python bindings don't use swig anymore
metze
2009-02-02 15:16:08 +01:00
Tim Prouty
2c2545d45a s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warnings 2009-01-30 14:41:07 -08:00
Stefan Metzmacher
3718cf294a lib/tdb: include replace.h and system/filesys.h in pytdb.c
This fixes the build on Tru64.

metze
2009-01-30 19:38:59 +01:00
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Jeremy Allison
07e0094365 Fix all warnings in source3 with gcc4.3.
Jeremy.
2008-12-31 18:06:57 -08:00
Jelmer Vernooij
22703bf3ff standalone: Use more variables, preparing to include these files from main
Samba 4 makefile.
2008-12-23 19:44:11 +01:00
Jelmer Vernooij
6704c27a78 Fix standalone build of tdb python module, update ignores for standalone tdb. 2008-12-22 23:39:30 +01:00
Jelmer Vernooij
6fe6983e4c Make sure to not close tdb database more than once. 2008-12-18 20:42:50 +00:00
Jelmer Vernooij
8c1ede0b32 Remove swig use from tdb standalone build. 2008-12-18 19:49:53 +00:00
Jelmer Vernooij
2da551bbcc Implement missing functions in pytdb. 2008-12-18 19:41:02 +00:00
Jelmer Vernooij
2a61fd41e9 Add simple manually written replacement for the tdb module. 2008-12-18 18:57:21 +00:00
Tim Prouty
e48a5cd5d4 s3/s4: Fix "shadows a global declaration" warning 2008-12-16 08:34:53 -08:00
Holger Hetterich
42366bcbbd Added a simple tdb integrity check to tdbtool. The command "check" runs traverse on the currently open tdb, and returns the number of entries if the integrity check is successful. 2008-12-16 13:58:48 +01:00
Andrew Tridgell
936d76802f imported the tdb_repack() code from CTDB
The tdb_repack() function repacks a TDB so that it has a single
freelist entry. The file doesn't shrink, but it does remove all
freelist fragmentation. This code originated in the CTDB vacuuming
code, but will now be used in ldb to cope with fragmentation from
re-indexing
2008-12-16 14:38:17 +11:00
Andrew Tridgell
2e4247782b make tdbbackup use transactions
tdbbackup was originally written before we had transactions, and it
attempted to use its own fsync() calls to make it safe. Now that we
have transactions we can do it in a much safer (and faster!) fashion
2008-12-16 14:36:56 +11:00
Stefan Metzmacher
8b7199e7b2 lib/tdb: increase the version number after some critial changes
The tdb_transaction/traverse interaction fixes are critical.

metze
2008-09-29 04:15:11 +02:00
Simo Sorce
3235e25425 Add shared-build target to tdb.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
2008-09-19 18:07:53 -04:00
Jelmer Vernooij
186d2d83cb Provide tdb.open and ldb.open python functions. 2008-09-19 12:47:52 +02:00
Jelmer Vernooij
94855cd692 Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00