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

2651 Commits

Author SHA1 Message Date
Jelmer Vernooij
2a82c45f02 lib/util: Remove dummy wrapper for getgrnam(). 2012-03-24 15:25:48 +01:00
Jelmer Vernooij
43f275008f lib/util: Remove dummy wrapper for getpwuid(). 2012-03-24 15:25:05 +01:00
Jelmer Vernooij
818e0722e1 lib/util: Remove dummy wrapper for getpwnam(). 2012-03-24 15:24:15 +01:00
Jelmer Vernooij
3be6258912 lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent. 2012-03-24 15:23:02 +01:00
Jelmer Vernooij
14fdc1c5cd lib/util: Move calloc_array and memalign_array to top-level libutil. 2012-03-24 15:19:09 +01:00
Jelmer Vernooij
c0c52ac1a4 lib/util: Remove prototype for removed sys_memalign. 2012-03-24 15:00:22 +01:00
Jelmer Vernooij
2d5275fae0 lib/util: Remove trivial wrapper sys_connect() around connect(). 2012-03-24 14:58:09 +01:00
Jelmer Vernooij
d4c4cb06c5 replace: Move memalign() from lib/util/system.c to libreplace. 2012-03-24 14:43:21 +01:00
Volker Lendecke
9e17e7d7f2 lib/async_req: Retry read_packet with read(2)
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
2012-03-23 17:31:24 +01:00
Rusty Russell
4442c0b2c9 lib/tdb: fix transaction issue for HAVE_INCOHERENT_MMAP.
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
2012-03-23 02:53:15 +01:00
Rusty Russell
c12970cc91 lib/tdb: fix test/run-die-during-transaction when HAVE_INCOHERENT_MMAP.
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>
2012-03-23 10:43:48 +10:30
Rusty Russell
330e3e1b91 lib/tdb: fix missing return 0 code.
fde694274e 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>
2012-03-23 10:41:55 +10:30
Rusty Russell
4816ffacb8 lib/tdb2: fix -Wcast-qual warnings.
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
2012-03-22 03:29:32 +01:00
Rusty Russell
4ea9f8d4c0 lib/tdb2: fix -Wshadow warnings.
These warnings clutter things up, even though they're of marginal
utility.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:38 +01:00
Rusty Russell
a93e03d27d lib/tdb2: fix OpenBSD incoherent mmap (tdb2 version)
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>
2012-03-22 01:57:38 +01:00
Rusty Russell
aa5378602d lib/tdb2: fix OpenBSD incoherent mmap (tdb1 version)
This is a direct port of the previous patch, to the TDB2 codebase.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:38 +01:00
Rusty Russell
fde694274e lib/tdb: fix OpenBSD incoherent mmap.
This comment appears in two places in the code (commit
4c6a8273c6 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>
2012-03-22 01:57:37 +01:00
Rusty Russell
584b996a1a lib/replace: test for incoherent mmap.
We test for other mmap features here, and both tdb1 and tdb2 want this check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:37 +01:00
Rusty Russell
b3a6ffd7b2 lib/ccan/failtest: compile fix for OpenBSD
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>
2012-03-22 01:57:37 +01:00
Rusty Russell
675593221c lib/ccan: namespacize ccan/list to avoid conflict with OpenIndiana's sys/list.h
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>
2012-03-22 01:57:37 +01:00
Rusty Russell
eafd837369 lib/tdb: fix up run-die-during-transaction test cases on Solaris.
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>
2012-03-22 01:57:37 +01:00
Amitay Isaacs
af68fe7113 build: Fix build issue on OpenBSD 5.x
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
2012-03-16 05:14:02 +01:00
Jelmer Vernooij
0affe19304 Remove more unnecessary shebang lines in python files.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Mar 16 02:48:52 CET 2012 on sn-devel-104
2012-03-16 02:48:52 +01:00
Ira Cooper
b990279304 util: Add --disable-fault-handling.
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.
2012-03-15 05:55:03 +01:00
Michael Adam
e625a319e2 testtools/matchers.py: fix a comment typo 2012-03-14 19:39:18 +01:00
Stefan Metzmacher
800209aad5 lib/util: only change umask during mkdir()
metze
2012-03-14 12:00:46 +01:00
Stefan Metzmacher
bfe990af89 lib/util: cope with races between lstat and mkdir in directory_create_or_exist()
metze
2012-03-14 12:00:46 +01:00
Stefan Metzmacher
e03059fc96 lib/util: use a helper variable in directory_create_or_exist()
metze
2012-03-14 12:00:46 +01:00
Stefan Metzmacher
f306261119 lib/util: do an early return on error directory_create_or_exist()
metze
2012-03-14 12:00:46 +01:00
Stefan Metzmacher
bd492befc0 lib/util: remove unneeded else branch in directory_create_or_exist()
metze
2012-03-14 12:00:46 +01:00
Stefan Metzmacher
687606b452 lib/util: don't start DEBUG output with 'error '
This confused the subunit code.

metze
2012-03-14 12:00:46 +01:00
Rusty Russell
3272ba0d2d lib/tdb: remove unnecessary XOPEN and FILE_OFFSET_BITS defines in test/
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
2012-03-14 10:12:26 +01:00
Rusty Russell
4d613d9ceb lib/tdb2: remove unneccessary _FILE_OFFSET_BITS define in test/.
This was a relic from testing; it can interfere with compile.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-14 08:32:34 +01:00
Matthieu Patou
b68f72c7f5 lib/crypto: Detect CommonCrypto and use it if available
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.
2012-03-14 06:52:27 +01:00
Rusty Russell
6dea4f24dc lib/tdb2: make summary handle capabilities properly.
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
2012-03-14 06:51:43 +01:00
Rusty Russell
5ba2e4fc39 lib/tdb2: fix error string formatting.
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>
2012-03-14 05:09:30 +01:00
Rusty Russell
ee0d1daa27 lib/tdb2: Add gcc-style format attribute to tdb_logerr.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-14 05:09:30 +01:00
Jelmer Vernooij
ce4531ee31 tdb_wrap: Move to specific directory.
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
2012-03-10 23:13:01 +01:00
Jelmer Vernooij
4c292c8e62 tevent: Install tevent.py into PYTHONARCHDIR rather than PYTHONDIR for consistency with other Samba scripts. 2012-03-10 21:31:52 +01:00
Rusty Russell
583ffeae40 lib/tdb: fix tests for standalone out-of-tree.
Commit 4d58d0fa8f 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
2012-03-10 07:07:45 +01:00
Andrew Bartlett
bc66af50ff lib/util: Add a callback facility for debug messages
This will allow dlz_bind9 to put log messages somewhere useful, which
may make it easier to debug.

Andrew Bartlett
2012-03-08 10:14:05 +01:00
Rusty Russell
b442e37525 failtest: don't assume FD_SETSIZE is maximum runtime fd.
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
2012-03-08 06:30:48 +01:00
Ira Cooper
e19cf64356 addns: Fix the Solaris/Illumos build.
uuid_t is not defined without including sys/uuid.h, configure+waf checks added.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-07 11:01:33 -08:00
Rusty Russell
8ad1986a96 lib/tdb2: add --valgrind, --valgrind-log options.
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
2012-03-07 04:57:21 +01:00
Rusty Russell
74d522237e lib/tdb2: wire up unit tests.
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>
2012-03-07 13:16:16 +11:00
Rusty Russell
9d897b0951 lib/tdb2: adapt unit tests to SAMBA environment.
This means changing headers, implementing a simple tap-like wrapper,
and also splitting out the helpers into those which are linked with
the api* tests (which can't use non-public tdb2 functions) and those
linked with the run* tests (which can).
 
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-07 13:16:16 +11:00
Rusty Russell
361f3ea9ee lib/ccan: import failtest and required ccan modules for TDB2 unit tests.
New modules: failtest, list, time, read_write_all and tlist.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-07 13:16:16 +11:00
Andrew Bartlett
d7bb961859 s3-auth: Remove security=share (depricated since 3.6).
This patch removes security=share, which Samba implemented by matching
the per-share password provided by the client in the Tree Connect with
a selection of usernames supplied by the client, the smb.conf or
guessed from the environment.

The rationale for the removal is that for the bulk of security=share
users, we just we need a very simple way to run a 'trust the network'
Samba server, where users mark shares as guest ok.  This is still
supported, and the smb.conf options are documented at
https://wiki.samba.org/index.php/Public_Samba_Server

At the same time, this closes the door on one of the most arcane areas
of Samba authentication.

Naturally, full user-name/password authentication remain available in
security=user and above.

This includes documentation updates for username and only user, which
now only do a small amount of what they used to do.

Andrew Bartlett

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SHARE       |
                  |    security=share    |
                  |                      |
                  |                      |
                  |       5 March        |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______
2012-03-04 23:33:05 +01:00
Andrew Bartlett
b07d504ca4 change low FDs are handled in Samba
We now only close fds 0, 1, 2 when we are a forked daemon, and take
care not to close a file descriptor that we might need for foreground
stdin monitoring.

This should fix stdout logging in the lsa and epmapper deamons (ie in
make test).

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Jelmer Vernooij
ebe04fc652 pyldb: Fix some more long lines, fix formatting.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Mar  2 05:26:56 CET 2012 on sn-devel-104
2012-03-02 05:26:56 +01:00
Jelmer Vernooij
e29a9f4af7 pyldb: Avoid using PyErr_LDB_ERROR_IS_ERR_RAISE where PyErr_SetLdbError suffices.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Mar  1 23:06:55 CET 2012 on sn-devel-104
2012-03-01 23:06:55 +01:00
Andrew Bartlett
6090a155f0 build: look for backtrace_symbols in libexec 2012-03-01 22:04:45 +11:00
Stefan Metzmacher
7102eafc26 lib/crypto: add aes_cmac_128_test.c as local.crypto.aes_cmac_128 test
metze
2012-02-29 03:16:22 +01:00
Stefan Metzmacher
062d1a09c2 lib/crypto: add aes_cmac_128* (rfc 4493)
Thanks to Jeremy, Michael and Volker for the debugging!

metze
2012-02-29 03:16:22 +01:00
Stefan Metzmacher
229128f7e1 lib/crypto: fix hmac_sha256_final() prototype
metze
2012-02-27 12:51:33 +01:00
Andrew Bartlett
c318c94170 s3-param: Align lp_{max,min}protocol with lib/param names
This adds an alisas to ensure that both our loadparm systems know all
the names.

I would like to move to the 'server ..' name as canonical, and this
will be raised on the list.

Andrew Bartlett
2012-02-27 07:36:05 +01:00
Rusty Russell
90c03ccf4c lib/tdb2: rename tdb2.pc to tdb.pc
The library is called tdb, so the pc file must have the same name.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Feb 27 06:59:58 CET 2012 on sn-devel-104
2012-02-27 06:59:58 +01:00
Amitay Isaacs
89586ed164 lib/tdb2: 2.0.0 ABI
Signed-off-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: Tue Feb 21 07:43:55 CET 2012 on sn-devel-104
2012-02-21 07:43:55 +01:00
Amitay Isaacs
abc74723ce lib/tdb2: Convert tdb2 to a standalone library
Adds a Makefile, configure script, and tdb2.pc.in.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:52 +10:30
Amitay Isaacs
f7b999fac0 lib/tdb2: Fix wscript
Particularly fix the upcoming standalone build.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:30 +10:30
Amitay Isaacs
4e9072660a lib/tdb2: Mark public function as such
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:22 +10:30
Amitay Isaacs
a63d731ae0 lib/tdb2: Do not include config.h in (to-be) public library, use replace.
Like tdb1, it's the caller's responsibility to set up various config
options (eg. by #include "config.h") before including the public
header.

We use HAVE_CCAN for including the (private) CCAN headers, otherwise
dummy macros are used.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:17 +10:30
Rusty Russell
e6901fa350 lib/tdb2: tools should use config.h, and replace where available.
The tdb2 tools should #include "config.h" before tdb2.h (about to
become a requirement) and use libreplace where available.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:12 +10:30
Rusty Russell
fb8cf568ca lib/ccan: define HAVE_CCAN.
This allows public headers to use CCAN if available, and dummy macros
if not (eg. tdb2).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-21 15:29:06 +10:30
Jelmer Vernooij
3992182fec popt: Check for popt manually as well, not just using pkg-config.
Older systems don't provide a pkg-config file for popt.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Feb 20 15:13:32 CET 2012 on sn-devel-104
2012-02-20 15:13:32 +01:00
Andrew Bartlett
3cd7fdab62 build: Add libbsd as a dep for LIBREPLACE_HOSTCC
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 20 02:58:20 CET 2012 on sn-devel-104
2012-02-20 02:58:20 +01:00
Jelmer Vernooij
d92306894a popt: Use pkg-config file to look for popt. 2012-02-19 03:10:03 +01:00
Andrew Bartlett
057b87d0bd lib/util: Remove unused sys_inet_makeaddr()
Found by callcatcher.

Andrew Bartlett
2012-02-17 12:19:29 +01:00
Andrew Bartlett
c8c3f0c608 lib/util: Remove unused sys_gethostbyname()
Found by callcatcher.

Andrew Bartlett
2012-02-17 12:19:29 +01:00
Andrew Bartlett
367c567c5f lib/util: Remove sys_poll as it is no longer needed
sys_poll() is only needed if the signal pipe is set up and used, but as
no signal handler ever writes to the pipe, this can all be removed.

signal based events are now handled via tevent.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-02-16 15:49:21 -08:00
Andrew Bartlett
ab80995580 lib/util: Remove unused sys_select_signal()
Now sys_poll needs to be cleaned up not to refer to the pipe that is now not used.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-02-16 15:49:09 -08:00
Volker Lendecke
9e25361203 tevent_signal: Fix a valgrind error
This fixes an uninitialized read introduced by my fix for the tevent_signal
destructors. From looking at the code you might believe that this kicks in only
when talloc failed. But with -O3 I do see it in normal operations.

Sorry for that.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 15 17:58:37 CET 2012 on sn-devel-104
2012-02-15 17:58:36 +01:00
Rusty Russell
4d58d0fa8f tdb: build and run unit tests in tdb/test/
Now we can build the test binaries: the CCAN style is to compile
everything called "compile_ok*.c", compile and run everything called
"run*.c", compile, link with the module, and run everything called
"api*.c", and link any other C files (presumably test helpers) into
all the tests.

Unfortunately, actually passing that between the various parts of
wscript is painful, so I open-coded the names.

Also, the tests expect to be run in a (temporary) directory they can
pollute, with the test directory found in test/ (to find the canned
TDB files, for example).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Tue Feb 14 06:53:46 CET 2012 on sn-devel-104
2012-02-14 06:53:46 +01:00
Rusty Russell
205242e176 tdb/test: fix up tests for use in SAMBA tdb code.
1) Make sure we include "tdb_private.h" first, to get the right headers
   (esp. the correct setting of _FILE_OFFSET_BITS before unistd.h).
2) Fix 3G file test since expand logic has changed.
3) Fix nested transaction test, since default is to allow nesting.
4) Capture fdatasync, which was slowing down transaction expand.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-14 14:45:21 +10:30
Rusty Russell
8fa345d952 tdb: wean CCAN-style unit tests off of tap.
We could use subunit, but that's overkill.  Just print messages when
we fail, and use exit status.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-14 14:45:19 +10:30
Rusty Russell
0802791081 tdb: import unit tests from CCAN into tdb/test/
I pulled tdb into CCAN as an experiment a while ago; it doesn't belong
there, but it has accumulated some important unit tests.

These are copied from CCAN version init-1486-gc438ec1 with #include "../"
changed to #include "../common/".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-14 04:05:43 +10:30
Rusty Russell
390b9a2dd8 tdb: make tdb_private.h idempotent.
The most convenient way to write unit tests in C is to directly
#include the C files (CCAN uses this, for example).  That works quite
well, but it means that tdb_private.h now needs to be protected
against multiple inclusions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-02-14 04:04:43 +10:30
Andrew Bartlett
4a0d1b5ac6 s3-libads: Move to using only the HAVE_KRB5 define
HAVE_KRB5 already implies that GSSAPI is present as well.

Andrew Bartlett
2012-02-13 04:41:05 +01:00
Andrew Bartlett
310cf98574 s3-lib/addns: Move to system/kerberos.h and HAVE_KRB5 2012-02-13 04:41:05 +01:00
Matthias Dieter Wallnöfer
1e46ccba5a LDB:pyldb.c - use always the case insensitive comparison for attribute names
We can make no assumptions about our users

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-02-13 09:49:12 +11:00
Andrew Bartlett
efc210d520 lib/util: Remove unused str_format_nbt_domain()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:13 +11:00
Andrew Bartlett
fc5a214d71 charset: Remove unused strcmp_w()
Found by callcatcher.

Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:13 +11:00
Andrew Bartlett
983d205486 charset: Remove unused iconv_talloc()
Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett
2012-02-10 16:45:11 +11:00
Stefan Metzmacher
de53fcd8de tevent: change the version to 0.9.15
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Feb  9 12:24:19 CET 2012 on sn-devel-104
2012-02-09 12:24:19 +01:00
Volker Lendecke
b5436fde5b tevent: Fix deleting signal events from within themselves
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-02-09 10:15:27 +01:00
Jeremy Allison
4cf9923b09 Fix shadow variable name warning.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb  8 22:55:08 CET 2012 on sn-devel-104
2012-02-08 22:55:08 +01:00
Jelmer Vernooij
8443e15eee crypto: Use libbsd md5 header, if available. 2012-02-07 01:11:08 +01:00
Jelmer Vernooij
634f8276dd crypto/md5: Change prototypes to match BSD. 2012-02-07 01:11:08 +01:00
Jelmer Vernooij
d6b4701503 charset/tests: Add prototypes for test functions. 2012-02-07 01:11:07 +01:00
Jelmer Vernooij
8f6d7d6cbf loadparm: handle P_SEP in switches (silences warning with clang). 2012-02-07 01:11:07 +01:00
Jelmer Vernooij
a05a9101b6 pysocketwrapper: fix behaviour to be consistent with 'socket.getsockopt'
socklen_t is unsigned
2012-02-07 01:11:07 +01:00
Jelmer Vernooij
9c000f1def crypto: Add prototype for main torture functions. 2012-02-07 01:11:07 +01:00
Volker Lendecke
a0e44c30e2 lib/util: Add hex_encode_buf
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Feb  6 09:15:33 CET 2012 on sn-devel-104
2012-02-06 09:15:32 +01:00
Ira Cooper
74ca6d1ddb s3-popt: Fix configure.developer builds on Solairs.
alloca.h needs to be included, or the build complains the implicit
definition of alloca.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb  4 03:27:42 CET 2012 on sn-devel-104
2012-02-04 03:27:42 +01:00
Michael Adam
2b9299310f loadparm: fix a load of uninitialized memory errors found by valgrind. 2012-02-03 11:10:29 +01:00
Jelmer Vernooij
e3dac4b61a replace: Only add bsd dependency when bsd library was found.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Feb  2 05:18:45 CET 2012 on sn-devel-104
2012-02-02 05:18:45 +01:00
Rusty Russell
b3fb115a39 tdb2: add --disable-tdb2
I thought you could --disable-tdb2=false, apparently not!  Thanks
Michael Adam...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Feb  2 03:43:08 CET 2012 on sn-devel-104
2012-02-02 03:43:08 +01:00
Andrew Bartlett
eecf2ac4c8 selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
Jelmer Vernooij
5931e1da87 replace: Add include for bsd/string.h. 2012-02-01 01:07:11 +01:00
Ira Cooper
a1901b55cf Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
2012-01-31 23:28:09 +01:00