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

950 Commits

Author SHA1 Message Date
Andrew Tridgell
ccfa40fdc3 util: update three other copies of our dlinklist.h macros
ldb and tevent have their own copies of these macros. This brings them
in sync with the master copy of dlinklist.h
2010-02-14 18:44:21 +11:00
Andrew Tridgell
76a7382346 lib: use TYPESAFE_QSORT() in lib/ and libcli/ 2010-02-14 18:44:20 +11:00
Andrew Tridgell
282cc79454 s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb code 2010-02-14 18:44:20 +11:00
Volker Lendecke
e371317686 use ZERO_STRUCT 2010-02-13 13:25:32 +01:00
Volker Lendecke
95ca53f3e0 Use ZERO_STRUCTP 2010-02-13 13:25:17 +01:00
Volker Lendecke
1a995ab51e s3: Fix a typo 2010-02-13 13:25:03 +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
Andrew Tridgell
f435538576 libreplace: add fdatasync() if not available 2010-02-13 22:36:11 +11:00
Andrew Tridgell
63844609da util: added TYPESAFE_QSORT() macro
This makes it much harder to get the type of a qsort comparison
function wrong.
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
Volker Lendecke
ebc08b9938 s3: Add tdb_data_equal 2010-02-12 23:12:10 +01:00
Andrew Tridgell
ae95d611b6 util: added file_compare() utility function
file_compare() returns true if two files are the same. It is meant for
small files.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-11 21:04:13 +11:00
Andrew Tridgell
d6fb64c512 libreplace: added replacements for dprintf() and vdprintf()
these are very useful for writing files with formatted writes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-11 21:04:13 +11:00
Andrew Tridgell
91cb7b7c60 test:local added LOCAL-DLINKLIST testsuite
(cherry picked from commit 95a5bee2c30a67a35604b0456ab7836f6dc67702)
2010-02-10 15:55:34 -08:00
Andrew Tridgell
32809bd8c1 util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)
This changes the meaning of the ->prev pointer in our doubly linked
lists to point at the end of the list from the front of the list. That
allows us to implement DLIST_ADD_END() and related functions in O(1)
time, which can be a huge saving in many places in Samba.

This also means that the 'type' argument to various DLIST_*() macros
is no longer needed, but I have left it in for now to keep the
patchset small, which will make it easier to revert if any problems
are found. In the future we should remove the 'type' arguments.

(jra. Move the one use of DLIST_TAIL over to the new macros).
2010-02-10 15:53:58 -08:00
Jeremy Allison
32575ed70f Temporary changes to dlinklist to keep the implementation static whilst
uses of (list)->prev are moved over to DLIST_PREV. This will be replaced
when the final (new) version of the dlinklist.h header is added.

Jeremy.
2010-02-10 15:30:59 -08: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
6bf2a821b7 talloc: Fix abi checks in release script
We must perform abi checks against the version we are going to release.
Not against the current tree we are in.
2010-02-08 10:12:50 -05:00
Simo Sorce
1422a94654 talloc: Fix abi checks and ifdefs
teach the abi check scripts to skip the DOXYGEN sections
fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
2010-02-08 10:02:49 -05:00
Stefan Metzmacher
02320cb0e2 libreplace: add check for NSS_WRAPPER_DISABLE similar to SOCKET_WRAPPER_DISABLE
metze
2010-02-08 09:59:23 +01:00
Volker Lendecke
6e7bcaa878 libreplace: Attempt to fix bug 5910, detect a broken getaddrinfo
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-08 09:59:20 +01:00
Bo Yang
8c8bb51de1 s3: signals are processed twice in child.
Signed-off-by: Bo Yang <boyang@samba.org>
2010-02-09 17:05:58 +08:00
Andrew Tridgell
7fed22eb0a talloc: fixed doc typo 2010-02-08 11:04:59 +11:00
Andreas Schneider
da0e396deb Move the talloc details to the mainpage.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andreas Schneider
52c0cd38fa talloc: Added doxygen config file.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andreas Schneider
fbd646a783 talloc: Documented talloc with doxygen.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11: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
Matthias Dieter Wallnöfer
e4d29bb4fd s4:UID wrapper - Make it work on older distributions
On my older CentOS 4 installation I had the problem with the missing
substitution prototypes ("uwrap_*"). So I added them to "uid_wrapper.h".

Also, I made the head of the "uid_wrapper.c" file more like the one of
"nss_wrapper.c" - it shouldn't change that much, I did it only to be consistent.

This patch should fix the build on older distributions while keep it running on
newer ones.
2010-02-05 19:47:26 +01:00
Matthias Dieter Wallnöfer
16aa0744c6 s4:UID wrapper - Fix includes
The includes of the UID wrapper headers werent't really efficient according
to metze's post on the technical mailing list (http://lists.samba.org/archive/samba-technical/2010-February/069165.html).
To achieve this move the "uid_wrapper.h" includes into "lib/util/unix_privs.c",
 "lib/util/util.c", "ntvfs/posix/pvfs_acl.c" and "ntvfs/unixuid/vfs_unixuid.c".
2010-02-05 19:47:26 +01:00
Matt Kraai
a7250eb142 Change uint_t to unsigned int in lib/util
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Matt Kraai
2cb2d5317f Change uint_t to unsigned int in lib/talloc
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Matt Kraai
d4fc2e8201 Change uint_t to unsigned int in lib/crypto
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Matt Kraai
a2c95a5d96 Change uint_t to unsigned int in lib/replace
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01: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
ad6ea7b189 lib/util: remove data_blob_talloc_reference()
We want to avoid the usage of talloc_reference() in Samba.

metze
2010-01-29 11:16:44 +01:00
Kai Blin
88099bcc93 tsocket: Fix the description of tstream_writev_queue_send/recv 2010-01-28 11:16:24 +01:00
Kai Blin
9184f524f0 tsocket: Fix description for tstream_readv_pdu_queue_send/recv 2010-01-28 11:11:33 +01:00
Björn Jacke
e87adf523b Revert "libreplace: fix unused varibale warning on IRIX"
this one was broken
2010-01-26 01:16:37 +01:00
Björn Jacke
b6839e1bfd libreplace: fix unused varibale warning on IRIX 2010-01-26 00:19:10 +01:00
Karolin Seeger
463aa06442 lib/popt: Fix typo in README.
Karolin
2010-01-25 19:54:24 +01:00
Volker Lendecke
a771c184b1 libreplace: Fix a C++ warning 2010-01-23 14:35:38 +01:00
Jelmer Vernooij
c42242d132 s4: Include Python.h early to avoid double definition errors. 2010-01-21 16:15:10 +13:00
Lars Müller
9e318129e0 Work around bad use of autoconf interna
Merge fix made by Andreas Schwab <schwab@linux-m68k.org>.  This change
had been in use by SUSE since 2008-07-03.
2010-01-18 11:49:01 +01:00
Jelmer Vernooij
2ec5792a4b subunit/testtools: Include newer version. 2010-01-16 19:56:21 +13:00
Jelmer Vernooij
28577aae92 Import testtools as well, required for subunit. 2010-01-16 19:53:49 +13:00
Jelmer Vernooij
b6b46b4978 subunit: Import new version. 2010-01-16 19:53:49 +13:00
Jelmer Vernooij
2e38cb2cbb Add README about subunit. 2010-01-16 19:53:49 +13:00
Jelmer Vernooij
664b74d366 Add script for updating the copy of subunit. 2010-01-16 19:53:49 +13:00