summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
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
2010-02-08Move the talloc details to the mainpage.Andreas Schneider2-64/+69
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08talloc: Added doxygen config file.Andreas Schneider1-0/+1538
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08talloc: Documented talloc with doxygen.Andreas Schneider2-67/+1559
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-06tdb: raise version to 1.2.1Simo Sorce1-1/+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-05s4:UID wrapper - Make it work on older distributionsMatthias Dieter Wallnöfer2-4/+20
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-05s4:UID wrapper - Fix includesMatthias Dieter Wallnöfer2-1/+19
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-02Change uint_t to unsigned int in lib/utilMatt Kraai4-6/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02Change uint_t to unsigned int in lib/tallocMatt Kraai2-6/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02Change uint_t to unsigned int in lib/cryptoMatt Kraai1-4/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02Change uint_t to unsigned int in lib/replaceMatt Kraai4-4/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01tdb: fix an early release of the global lock that can cause data corruptionVolker Lendecke1-5/+10
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-01-29lib/util: remove data_blob_talloc_reference()Stefan Metzmacher2-23/+0
We want to avoid the usage of talloc_reference() in Samba. metze
2010-01-28tsocket: Fix the description of tstream_writev_queue_send/recvKai Blin1-6/+6
2010-01-28tsocket: Fix description for tstream_readv_pdu_queue_send/recvKai Blin1-7/+6
2010-01-26Revert "libreplace: fix unused varibale warning on IRIX"Björn Jacke1-2/+2
this one was broken