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

287 Commits

Author SHA1 Message Date
Tim Potter
fa8d0dc14a r14968: Move tdb and ldb swig wrappers in to lib/tdb and lib/ldb directories. 2007-10-10 14:00:48 -05:00
Andrew Tridgell
4c3f3c4141 r14916: print errno so I can work out why OpenBSD is failing the test for tdb
in the build farm. msync() is failing.
2007-10-10 14:00:16 -05:00
Andrew Tridgell
f325ba605c r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allows
for an extremely lightweight test to see if a tdb has possibly
changed.
2007-10-10 13:59:20 -05:00
Andrew Tridgell
1624ea88e6 r14616: added notify change support to the posix backend
It doesn't fully work yet, and doesn't yet have all the efficiency
that is planned, but it doesn't break anything and I wanted to get the
code in the tree to minimise the chance of collisions with the work
metze is doing.
2007-10-10 13:59:02 -05:00
Jelmer Vernooij
4682bc5ce0 r14492: Fix shared libs - set SO_VERSION to 0 everywhere for now. 2007-10-10 13:57:32 -05:00
Jelmer Vernooij
9c37f847d3 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone. 2007-10-10 13:57:30 -05:00
Jelmer Vernooij
7871b07e21 r14327: Replace MAJOR_VERSION/MINOR_VERSION/RELEASE_VERSION with two parameters:
- VERSION: should contain the current version. Will be made part of the filename.
 - SO_VERSION: should contain the latest version that this on is compatible to. Will be used for setting the soname of the shared library.

Fix sonames and use them on platforms that support them
Remove symlinking code. ldconfig will take care of creating the symlinks now
that we set the soname.
2007-10-10 13:57:12 -05:00
Jeremy Allison
d2e9d5b34b r14029: Fix resource leak in error codepath. Coverity CID #64.
Jeremy.
2007-10-10 13:52:37 -05:00
Jelmer Vernooij
2c74698032 r13960: Generate makefile rules for installing/removing shared modules. 2007-10-10 13:52:32 -05:00
Simo Sorce
1113d4caa7 r13773: Be consistent in the way you get out and free allocated data 2007-10-10 13:52:11 -05:00
Jelmer Vernooij
4599703914 r13651: Always make sure pkgconfig directory exists 2007-10-10 13:52:04 -05:00
Andrew Tridgell
a37d9434d1 r13283: added two optimisations to the tdb transactions code. The first is to
more agressively coalesce entries in the linked list of the undo
log. The second is to ensure that writes during a transaction into the
hash table don't cause the size of the undo log linked list to grow.

These optimisations don't affect Samba much, but they make a huge
difference to the use of ldb in kde
2007-10-10 13:51:42 -05:00
Jelmer Vernooij
b24f2583ed r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
2007-10-10 13:47:45 -05:00
Jelmer Vernooij
a86abe84e2 r12254: Add some (hopefully correct) descriptions for libraries that are installed.
Install pkg-config files.
2007-10-10 13:47:24 -05:00
Simo Sorce
22c8c97e6f r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
2007-10-10 13:45:53 -05:00
Jelmer Vernooij
90f49b6f70 r11304: Add support back in for loading shared modules (not used yet) 2007-10-10 13:45:16 -05:00
Jelmer Vernooij
b4745032a2 r11303: Support defining and installing public headers for libraries.
Support installing libraries.
Get rid of pkg-config file (will be autogenerated later on).
2007-10-10 13:45:16 -05:00
Jelmer Vernooij
98d1f9b1dc r11300: Treat libraries as a special kind of subsystem
(one that can also be built as a library and installed).
2007-10-10 13:45:15 -05:00
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Jelmer Vernooij
7fffc5c917 r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html) 2007-10-10 13:45:03 -05:00
Andrew Tridgell
ef020d599f r10893: add configure test for utime (needed for the previous utime patch) 2007-10-10 13:39:40 -05:00
Andrew Tridgell
b2934732dd r10891: I noticed that the secrets.db was not being backed up on my system due
to msync/mmap not changing the mtime of the file. This patch ensures
that for successfully completed transactions we update the mtime.

I don't do this on all tdb writes as its too expensive, but doing it
just on transactions is bearable, as those cost quite a lot anyway.
2007-10-10 13:39:40 -05:00
Jelmer Vernooij
b53313dc51 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
2007-10-10 13:39:08 -05:00
Andrew Tridgell
f02a92787b r10524: SAFE_FREE() in tdb does not need the discard_const_p()
the discard_const_p() was causing problems on openbsd where intptr_t is not defined
2007-10-10 13:39:01 -05:00
Andrew Tridgell
54203aacd1 r10522: finally got the locking working on solaris10. This adds a read lock on
the transaction lock in tdb_traverse_read(). This prevents a pattern
of locks which triggers the deadlock detection code in solaris10. I
suspect solaris10 is trying to prevent lock starvation by granting
locks in the order they were requested, which makes it much easier to
produce deadlocks.
2007-10-10 13:39:00 -05:00
Andrew Tridgell
11739ad31d r10496: - added configure test for sys/time.h
- print length of failed locks
2007-10-10 13:38:56 -05:00
Andrew Tridgell
a11762e7bc r10495: older redhat boxes need sys/time.h for select() 2007-10-10 13:38:56 -05:00
Andrew Tridgell
1b03c4e6c7 r10494: - don't generate a tdb log message for any type of failed lock probe
- if the lock upgrade loop ever fails then log a warning
2007-10-10 13:38:55 -05:00
Andrew Tridgell
144cc3da5e r10493: we need sys/select.h to enable select() in the solaris workaround 2007-10-10 13:38:55 -05:00
Andrew Tridgell
980dd17f7d r10492: work around a bug in solaris which cases lock upgrades to fail with
EDEADLK even when progress can be made. This is not a good solution,
but I can't find anything better.
2007-10-10 13:38:55 -05:00
Andrew Tridgell
196995ea38 r10484: try to fix the pread/pwrite declaration problems 2007-10-10 13:38:53 -05:00
Andrew Tridgell
315653cf1e r10483: fixed some uninitialised variables warnings 2007-10-10 13:38:53 -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
fc692dc61f r10469: use the older style of structure initialisation for tdb to make it
more portable. tdb is used in more than just Samba4, and I think the
portability/readability balance is a bit different
2007-10-10 13:38:50 -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
0177c6ca3e r10467: aix doesn't like zero length malloc :( 2007-10-10 13:38:50 -05:00
Andrew Tridgell
e615f36733 r10466: work around missing pread/pwrite declaration on openbsd 2007-10-10 13:38:49 -05:00
Andrew Tridgell
294ccfd46a r10465: separate out a read_only db from a read-only traversal to ensure we
don't end up doing a mmap read only
2007-10-10 13:38:49 -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
312491b251 r10462: cope better with compilers that don't put the object file in the same directory
as the source
2007-10-10 13:38:49 -05:00
Andrew Tridgell
83168c7e76 r10461: fixed tdb build on systems without stdint.h 2007-10-10 13:38:48 -05:00
Andrew Tridgell
bce35ad237 r10460: fixed portability of transaction code to systems with integer
alignment constraints (like sparc)
2007-10-10 13:38:48 -05:00
Andrew Tridgell
03942dd54b r10459: fixed some portability problems 2007-10-10 13:38:48 -05:00
Andrew Tridgell
9b53e04377 r10424: for caller convenience, automatically turn a tdb_traverse() into a
tdb_traverse_read() for read only databases
2007-10-10 13:38:44 -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
Jelmer Vernooij
749b19d34f r10420: Two minor scons fixes 2007-10-10 13:38:43 -05:00
Tim Potter
5f530eacba r10415: The ldb and tdb libraries are bad examples to test out the make proto
code as they are marked as NOPROTO in the config.mk files.
2007-10-10 13:38:43 -05:00
Andrew Tridgell
fa353a5bc5 r10410: blindly update the scons file for tdb. I'm not sure how this works,
but it definately needs transaction.c now
2007-10-10 13:38:42 -05:00