summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* lib/util: Allow calloc use in util.c, too.Jelmer Vernooij2012-03-241-0/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 18:50:32 CET 2012 on sn-devel-104
* replace: Work around socket wrapper.Jelmer Vernooij2012-03-241-0/+1
| | | | It's fine to ignore socket wrapper here, as it doesn't deal with unix domain sockets.
* replace: Add system/network.h for ucred struct.Jelmer Vernooij2012-03-241-0/+1
|
* libreplace: Add getpeereid implementation.Jelmer Vernooij2012-03-246-31/+71
|
* lib/util: Remove dummy wrapper for getgrgid().Jelmer Vernooij2012-03-242-10/+0
|
* lib/util: Remove dummy wrapper for getgrnam().Jelmer Vernooij2012-03-242-7/+1
|
* lib/util: Remove dummy wrapper for getpwuid().Jelmer Vernooij2012-03-242-8/+2
|
* lib/util: Remove dummy wrapper for getpwnam().Jelmer Vernooij2012-03-242-8/+2
|
* lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent.Jelmer Vernooij2012-03-242-22/+0
|
* lib/util: Move calloc_array and memalign_array to top-level libutil.Jelmer Vernooij2012-03-242-0/+32
|
* lib/util: Remove prototype for removed sys_memalign.Jelmer Vernooij2012-03-241-4/+0
|
* lib/util: Remove trivial wrapper sys_connect() around connect().Jelmer Vernooij2012-03-242-20/+0
|
* replace: Move memalign() from lib/util/system.c to libreplace.Jelmer Vernooij2012-03-245-38/+45
|
* lib/async_req: Retry read_packet with read(2)Volker Lendecke2012-03-231-0/+4
| | | | | | | This way it will also work with pipes Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Mar 23 17:31:24 CET 2012 on sn-devel-104
* lib/tdb: fix transaction issue for HAVE_INCOHERENT_MMAP.Rusty Russell2012-03-231-11/+10
| | | | | | | | | | | | | | | | | We unmap the tdb on expand, the remap. But when we have INCOHERENT_MMAP (ie. OpenBSD) and we're inside a transaction, doing the expand can mean we need to read from the database to partially fill a transaction block. This fails, because if mmap is incoherent we never allow accessing the database via read/write. The solution is not to unmap and remap until we've actually written the padding at the end of the file. Reported-by: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Fri Mar 23 02:53:15 CET 2012 on sn-devel-104
* lib/tdb: fix test/run-die-during-transaction when HAVE_INCOHERENT_MMAP.Rusty Russell2012-03-231-0/+5
| | | | | | | | Since we force mmap on, we don't intercept writes to the db, so we never see it in an inconsistent state. #ifdef over the check that we should have recovered it at least once. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: fix missing return 0 code.Rusty Russell2012-03-231-1/+1
| | | | | | | fde694274e1e5a11d1473695e7ec7a97f95d39e4 made tdb_mmap return an int, but didn't put the return 0 on the "internal db" case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb2: fix -Wcast-qual warnings.Rusty Russell2012-03-2215-59/+33
| | | | | | | | | | | | | We use tdb_mkdata() to get rid of many of them from the tests, and explicit cast_const() in a few places. tlist_for_each() still causes a warning, but that needs to be fixed in CCAN. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Thu Mar 22 03:29:32 CET 2012 on sn-devel-104
* lib/tdb2: fix -Wshadow warnings.Rusty Russell2012-03-226-27/+27
| | | | | | | | These warnings clutter things up, even though they're of marginal utility. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb2: fix OpenBSD incoherent mmap (tdb2 version)Rusty Russell2012-03-223-8/+31
| | | | | | | | This handles incoherent mmaps for TDB2 native databases, by forcing mmap on for such systems, just like we did for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb2: fix OpenBSD incoherent mmap (tdb1 version)Rusty Russell2012-03-223-24/+56
| | | | | | | This is a direct port of the previous patch, to the TDB2 codebase. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: fix OpenBSD incoherent mmap.Rusty Russell2012-03-224-24/+58
| | | | | | | | | | | | | | | | | | | | | | | This comment appears in two places in the code (commit 4c6a8273c6dd3e2aeda5a63c4a62aa55bc133099 from 2001): /* * We must ensure the file is unmapped before doing this * to ensure consistency with systems like OpenBSD where * writes and mmaps are not consistent. */ But this doesn't help, because if one process is using mmap and another using pwrite, we get incoherent results. As demonstrated by OpenBSD's failure on the tdb unit tests. Rather than disable mmap on OpenBSD, we test for this issue and force mmap to be enabled. This means that we will fail on very large TDBs on 32-bit systems, but it's better than the horrendous performance penalty on every OpenBSD system. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/replace: test for incoherent mmap.Rusty Russell2012-03-223-0/+97
| | | | | | | We test for other mmap features here, and both tdb1 and tdb2 want this check. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/ccan/failtest: compile fix for OpenBSDRusty Russell2012-03-223-0/+17
| | | | | | | | | | | OpenBSD doesn't idempotent-wrap sys/mman.h, so when we #define mmap to an alternative, it fails to compile when sys/mman.h is included again. Workaround is not to #define mmap to add arguments on Open BSD. (Imported from CCAN commit e18e80fe175422d26efe689addc0f67bdba0e097) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/ccan: namespacize ccan/list to avoid conflict with OpenIndiana's sys/list.hRusty Russell2012-03-2220-357/+392
| | | | | | | | | CCAN includes a little utility called "namespacize" which prepends ccan_ to all public methods of a module, and fixes up any dependencies it finds. It's a little primitive, but it works here. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb: fix up run-die-during-transaction test cases on Solaris.Rusty Russell2012-03-224-5/+4
| | | | | | | | | | By using a different include order, we end up with a different version of FILE_OFFSET_BITS (and probably other things) in parts of the test. The different variants get linked together, and the result is weird: the stat returns 0 size. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* build: Fix build issue on OpenBSD 5.xAmitay Isaacs2012-03-161-1/+1
| | | | | | | Do not use -Wl,-no-undefined flag on OpenBSD 5.x (tested on 5.0) Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Fri Mar 16 05:14:03 CET 2012 on sn-devel-104
* Remove more unnecessary shebang lines in python files.Jelmer Vernooij2012-03-161-2/+0
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Fri Mar 16 02:48:52 CET 2012 on sn-devel-104
* util: Add --disable-fault-handling.Ira Cooper2012-03-153-0/+8
| | | | | | On some platforms you can not debug coredumps after the default signal handler gets done dumping core. This allows waf to have an option to disable our default signal handler.
* testtools/matchers.py: fix a comment typoMichael Adam2012-03-141-1/+1
|
* lib/util: only change umask during mkdir()Stefan Metzmacher2012-03-141-7/+4
| | | | metze
* lib/util: cope with races between lstat and mkdir in directory_create_or_exist()Stefan Metzmacher2012-03-141-2/+8
| | | | metze
* lib/util: use a helper variable in directory_create_or_exist()Stefan Metzmacher2012-03-141-2/+5
| | | | metze
* lib/util: do an early return on error directory_create_or_exist()Stefan Metzmacher2012-03-141-10/+10
| | | | metze
* lib/util: remove unneeded else branch in directory_create_or_exist()Stefan Metzmacher2012-03-141-21/+24
| | | | metze
* lib/util: don't start DEBUG output with 'error 'Stefan Metzmacher2012-03-141-1/+1
| | | | | | This confused the subunit code. metze
* lib/tdb: remove unnecessary XOPEN and FILE_OFFSET_BITS defines in test/Rusty Russell2012-03-1417-20/+0
| | | | | | | | | | These were relics: they don't need to be defined here as long as we are careful to include the replace headers before any standard headers (we are). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Mar 14 10:12:26 CET 2012 on sn-devel-104
* lib/tdb2: remove unneccessary _FILE_OFFSET_BITS define in test/.Rusty Russell2012-03-141-2/+0
| | | | | | This was a relic from testing; it can interfere with compile. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/crypto: Detect CommonCrypto and use it if availableMatthieu Patou2012-03-143-1/+15
| | | | | | | | | | CommonCrypto/CommonDigest is available on Mac and there is function in the libc for MD5 calculation. MD5Final is a C define of CC_MD5_Final. Under some circumstance we have the symbol defined twice in samba binaries on Snow Leopard at least. By detecting CommonCrypto/CommonDigest we end up always using the system version if available.
* lib/tdb2: make summary handle capabilities properly.Rusty Russell2012-03-141-31/+13
| | | | | | | | | | Another PPC issue (endian?) revealed that the summary code did not handle capabilities correctly: in fact, it went into an endless loop. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Mar 14 06:51:43 CET 2012 on sn-devel-104
* lib/tdb2: fix error string formatting.Rusty Russell2012-03-143-5/+7
| | | | | | | This caused a crash on PPC64 when we failed the mmap (found by failtest, reported by Amitay) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/tdb2: Add gcc-style format attribute to tdb_logerr.Rusty Russell2012-03-141-4/+5
| | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb_wrap: Move to specific directory.Jelmer Vernooij2012-03-104-8/+9
| | | | | | | | | | It's a bit confusing to mix low-level and high-level libraries. We had multiple libraries in one directory, and there were have circular dependencies with other libraries outside that directory (in this case, samba-hostconfig). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
* tevent: Install tevent.py into PYTHONARCHDIR rather than PYTHONDIR for ↵Jelmer Vernooij2012-03-101-1/+1
| | | | consistency with other Samba scripts.
* lib/tdb: fix tests for standalone out-of-tree.Rusty Russell2012-03-101-1/+2
| | | | | | | | | | | | Commit 4d58d0fa8f936e7efdc02e31c053d42a47b3e62a didn't work for lib/tdb outside the build tree: symlink was pointing to wrong place. Copy simplification from lib/tdb2, and fix the build farm. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Sat Mar 10 07:07:45 CET 2012 on sn-devel-104
* lib/util: Add a callback facility for debug messagesAndrew Bartlett2012-03-082-14/+52
| | | | | | | This will allow dlz_bind9 to put log messages somewhere useful, which may make it easier to debug. Andrew Bartlett
* failtest: don't assume FD_SETSIZE is maximum runtime fd.Rusty Russell2012-03-083-3/+68
| | | | | | | | | | | | | This breaks when rlimit is less. Unfortunately, valgrind (32 bit x86, 3.7.0.SVN, Ubuntu) fails to set the file limit properly on the test: reducing it to the obvious getrlimit/setrlimit/getrlimit works fine, so leaving diagnostics for another day. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a85a809bb17af6b6cf6fa31b300c6622f64ee700) Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Thu Mar 8 06:30:48 CET 2012 on sn-devel-104
* addns: Fix the Solaris/Illumos build.Ira Cooper2012-03-072-0/+10
| | | | | | uuid_t is not defined without including sys/uuid.h, configure+waf checks added. Signed-off-by: Jeremy Allison <jra@samba.org>
* lib/tdb2: add --valgrind, --valgrind-log options.Rusty Russell2012-03-071-1/+13
| | | | | | | | | | Not used by default, since it slows down testing (on my laptop) from 22 seconds to 2 minutes 30 seconds. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Mar 7 04:57:21 CET 2012 on sn-devel-104
* lib/tdb2: wire up unit tests.Rusty Russell2012-03-072-1/+81
| | | | | | | | | The tests are ccan-style, so the names tell how to link them. This logic is generic, and could be moved to wafsamba, cleaned up, and used elsewhere. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>