summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2010-02-17tdb: cleanup: split brlock and brunlock methods.Rusty Russell7-117/+235
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-23libreplace: Remove the obsolete signal type cast.Andreas Schneider3-13/+4
AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal handlers to return void, only K&R returned int.
2010-02-23libutil: Remove obsolete signal type cast.Andreas Schneider1-5/+5
2010-02-22Spelling fixes for libutilBrad Hards7-24/+24
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes in lib/zlib.Brad Hards11-20/+20
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for libreplace.Brad Hards2-2/+2
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for tsocket API documentation.Brad Hards1-14/+14
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for lib/compression.Brad Hards1-2/+2
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for nss_wrapper.Brad Hards1-2/+2
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for popt API documentation.Brad Hards1-2/+2
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for tevent.Brad Hards3-4/+4
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22Spelling fixes for tdb.Brad Hards2-2/+2
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-19nss_wrapper: fix segfault in print_group() in the testsuiteMichael Adam1-1/+1
Running 'TESTS=posix_s3 POSIX_SUBTESTS="RPC-SAMR-LARGE-DC LOCAL-NSS-WRAPPER" make test' from s3 made smbtorture4 crash on my box. Michael
2010-02-18s4-smbtorture: add LOCAL-NSS-WRAPPER-DUPLICATES test.Günther Deschner1-1/+92
Guenther
2010-02-18s4-smbtorture: be more verbose in LOCAL-NSS-WRAPPER.Günther Deschner1-4/+4
Guenther
2010-02-18tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()Stefan Metzmacher1-2/+4
metze
2010-02-17Fix commit d07cd37b993d3c9beded20323174633b806196b5Jeremy Allison1-1/+4
Which was: tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD Metze, this has to have been wrong - you are throwing away the talloc_realloc pointer returned. Also no error checking. Please review. Thank goodness for gcc warnings :-). Jeremy.
2010-02-17tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREADStefan Metzmacher1-4/+6
metze
2010-02-17tsocket/bsd: set IPV6_V6ONLY on AF_INET6 socketsStefan Metzmacher1-0/+36
Some system already have this as default. It's easier to behave the same way on all systems and handle ipv6 and ipv4 sockets separate. metze
2010-02-17tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote ↵Stefan Metzmacher1-2/+53
address if the local address is any metze
2010-02-17tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in ↵Stefan Metzmacher1-1/+1
tstream_bsd_connect_send() This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX sockets. Also some platforms require exact values for AF_INET and AF_INET6. metze
2010-02-17tsocket/bsd: fix do_bind logic for AF_INETStefan Metzmacher1-2/+2
We want the explicit bind() when we don't use the any address. metze
2010-02-17socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()Stefan Metzmacher1-0/+4
metze
2010-02-17util: added samba_runcmd()Andrew Tridgell3-0/+275
This allows us to run a child command in an async fashion, with control over logging of stdout and stderr (which appears in the Samba log file). This is useful for ensuring we don't miss important messages from rndc commands (for example). Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-16s4-dsdb: removed gendb_search_single_extended_dn()Andrew Tridgell2-105/+0
Use dsdb_search_one() instead, which allows for arbitrary controls Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-14util: update three other copies of our dlinklist.h macrosAndrew Tridgell1-48/+115
ldb and tevent have their own copies of these macros. This brings them in sync with the master copy of dlinklist.h
2010-02-14lib: use TYPESAFE_QSORT() in lib/ and libcli/Andrew Tridgell1-1/+2
2010-02-14s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb codeAndrew Tridgell1-1/+3
2010-02-13use ZERO_STRUCTVolker Lendecke1-1/+2
2010-02-13Use ZERO_STRUCTPVolker Lendecke1-1/+1
2010-02-13s3: Fix a typoVolker Lendecke1-1/+1
2010-02-13tdb: use fdatasync() instead of fsync() in transactionsAndrew Tridgell1-1/+1
This might help on some filesystems
2010-02-13libreplace: add fdatasync() if not availableAndrew Tridgell2-1/+5
2010-02-13util: added TYPESAFE_QSORT() macroAndrew Tridgell1-0/+38
This makes it much harder to get the type of a qsort comparison function wrong.
2010-02-13tdb: Apply some const, just for clarityVolker Lendecke1-1/+1
2010-02-12s3: Add tdb_data_equalVolker Lendecke2-0/+9
2010-02-11util: added file_compare() utility functionAndrew Tridgell2-0/+27
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-11libreplace: added replacements for dprintf() and vdprintf()Andrew Tridgell2-1/+32
these are very useful for writing files with formatted writes Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-10test:local added LOCAL-DLINKLIST testsuiteAndrew Tridgell1-0/+130
(cherry picked from commit 95a5bee2c30a67a35604b0456ab7836f6dc67702)
2010-02-10util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)Andrew Tridgell1-59/+111
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-10Temporary changes to dlinklist to keep the implementation static whilstJeremy Allison1-0/+16
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-10tdb: fix recovery reuse after crashRusty Russell1-4/+10
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-10tdb: give a name to the invalid recovery area constant (0)Rusty Russell3-4/+5
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-08release-scripts: parametrize scriptsSimo Sorce3-62/+84
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-08talloc: Fix abi checks in release scriptSimo Sorce1-17/+24
We must perform abi checks against the version we are going to release. Not against the current tree we are in.
2010-02-08talloc: Fix abi checks and ifdefsSimo Sorce3-4/+32
teach the abi check scripts to skip the DOXYGEN sections fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
2010-02-08libreplace: add check for NSS_WRAPPER_DISABLE similar to SOCKET_WRAPPER_DISABLEStefan Metzmacher1-2/+4
metze
2010-02-08libreplace: Attempt to fix bug 5910, detect a broken getaddrinfoVolker Lendecke1-0/+25
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-09s3: signals are processed twice in child.Bo Yang3-5/+36
Signed-off-by: Bo Yang <boyang@samba.org>
2010-02-08talloc: fixed doc typoAndrew Tridgell1-1/+1