summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2011-10-06s3: Use the uid_wrapperVolker Lendecke1-0/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
2011-10-06uid_wrapper: We have talloc_array_length, no need for an explicit lengthVolker Lendecke1-9/+9
Signed-off-by: Andreas Schneider <asn@samba.org>
2011-10-06lib/util: consolidate module loadingAndrew Bartlett2-32/+36
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Oct 6 08:52:30 CEST 2011 on sn-devel-104
2011-10-06modules: standardise on samba_init_module as the hook symbol to resolveAndrew Bartlett2-4/+4
2011-10-06lib/util: Use only init_module_fn typedef in module loadingAndrew Bartlett2-3/+2
2011-10-06lib/util: Remove unused module loading functionsAndrew Bartlett2-14/+2
2011-10-06lib/util: consolidate module loading into common codeAndrew Bartlett3-0/+314
This creates a samba-modules private libary that handles the details. Andrew Bartlett
2011-10-06ldb: support raw OIDs in control string parsingAndrew Tridgell2-0/+19
this makes it possible to use a raw OID string on the command line or in python scripts Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06ldb: fixed memory leak in control string parsingAndrew Tridgell1-0/+24
if parsing fails, free ctrl Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04lib/util: make sure panic action can attach a debugger on ubuntu (>=10.10)Stefan Metzmacher1-0/+7
By default user processes can't attach a debugger to a process. So explicitly allow that for all child processes, before calling the panic action script. metze
2011-10-04s4-ldb: enable display of partialAttributeSet with --show-binaryAndrew Tridgell2-1/+23
2011-10-03testtools: Import new upstream snapshot.Jelmer Vernooij10-33/+597
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Oct 3 13:54:06 CEST 2011 on sn-devel-104
2011-09-29socket_wrapper: correctly handle dup()/dup2() ref countingStefan Metzmacher1-85/+81
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 29 13:13:56 CEST 2011 on sn-devel-104
2011-09-29socket_wrapper: pass down the fd explictly from the swrap_*() to the ↵Stefan Metzmacher1-10/+11
real_*() calls metze
2011-09-25addns: Remove unused empty header fileKai Blin1-30/+0
Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Sun Sep 25 09:15:09 CEST 2011 on sn-devel-104
2011-09-24net: Don't register link local addresses with DNSKai Blin2-0/+24
2011-09-24addns: Allow creating AAAA records during updatesKai Blin2-4/+60
2011-09-23build: Fix waf build on MacOS XAndrew Bartlett1-1/+1
The -framework CoreFoundation is required by the charset_macosxfs module The system/time.h header is required to access the replacement clock_gettime() Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Sep 23 10:58:02 CEST 2011 on sn-devel-104
2011-09-23build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett7-7/+7
2011-09-23lib/util: move some timespec helpers from source3 to the toplevelStefan Metzmacher2-0/+127
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 00:15:31 CEST 2011 on sn-devel-104
2011-09-21tdb2: change --enable-tdb2-breaks-compat to --enable-tdb2Rusty Russell1-2/+2
Since we no longer break compatibility, don't scare people. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Sep 21 09:25:11 CEST 2011 on sn-devel-104
2011-09-21tdb_compat: add "TDB_COMPAT_USE_TDB2" environment variableRusty Russell1-0/+4
When BUILD_TDB2 is defined, add TDB_VERSION1 flag to all tdb_open() calls, unless this flag is set. This means we use the tdb1 on-disk format unless the user specifically asks for tdb2. We'd love to do this using loadparm, but we need to work with both Samba 3 and Samba 4's loadparm, and they're not unified yet. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-21tdb_compat: honour hashsize arg when using tdb2 with TDB_VERSION1 flag.Rusty Russell2-3/+10
We use the TDB_ATTRIBUTE_TDB1_HASHSIZE to set the hash size. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-21tdb_compat: handle TDB_VOLATILE flag.Rusty Russell2-2/+12
This is only meaningful when using the TDB_VERSION1 flag: we set the attribute to control the maximum number of dead records (to 5, which is what TDB_VOLATILE did for tdb1). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-21tdb_compat: handle TDB_INCOMPATIBLE_HASH flag.Rusty Russell2-2/+12
This is only meaningful when using the TDB_VERSION1 flag: it is done by using a magic hash value (which will fall back to the default hash if that works instead). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-20tdb2: allow readonly changes even while holding locks.Rusty Russell1-10/+0
This happens in SAMBA with the TDB_VERSION1, presumably due to a read-only traverse nested inside a normal traverse (since it doesn't occur without TDB_VERSION1). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 24e5ddb143fb5e79112649472258f5da67cc7362) Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Tue Sep 20 09:35:10 CEST 2011 on sn-devel-104
2011-09-20lib/util/charset: remove charset module loadingAndrew Bartlett9-172/+105
Now that the 'table' modules are gone, there is no reason for there to be charset modules at all. This builds the macosxfs and weird modules into the binary at the appropriate times, and changes the tests to test instead the difference between the remaining internal handlers and iconv(). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
2011-09-20lib/util/charcnv: Remove broken internal CP850 and CP464 modulesAndrew Bartlett4-364/+0
These modules are now known to be faulty, and Samba 3.6.0 didn't include support for them, so we now require a system iconv if you wish to support these character sets for the non-ASCII range. Andrew Bartlett
2011-09-19ldb:"ldb_extended" -make the call more similar to "ldb_search"Matthias Dieter Wallnöfer1-2/+6
For example NULL out the LDB result pointer on failures. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-09-18swrap: Fix a c++ warningVolker Lendecke1-1/+2
2011-09-18pyldb: Drop unnecessary dependency on pytalloc-util.Jelmer Vernooij2-2/+1
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Sep 18 17:23:40 CEST 2011 on sn-devel-104
2011-09-15talloc: change version to 2.0.7Stefan Metzmacher3-1/+69
The version change is needed because the ABI file of the pytalloc code was fixed. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 15 22:32:59 CEST 2011 on sn-devel-104
2011-09-14tdb2: remove bogus leftover .orig file.Rusty Russell1-618/+0
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Sep 14 06:06:41 CEST 2011 on sn-devel-104
2011-09-14tdb_compat: change offset of CLEAR_IF_FIRST lock.Rusty Russell1-2/+2
This makes it match tdb1, which mean it will Just Work as TDB2 gets tdb1 format support. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Wed Sep 14 02:21:29 CEST 2011 on sn-devel-104
2011-09-14tdb_compat: support tdb_reopen/tdb_reopen_all for TDB2Rusty Russell2-3/+49
This matters with the clear-if-first support: we need to re-establish those locks at this point. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-14tdb2: fix prototypes which return enum TDB_ERROR.Rusty Russell2-10/+10
Since enums and ints are compatible in C, the compiler didn't warn that our prototypes for these functions disagreed with the definitions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 6d3832ee613adeb9ae7ed6454996ffa39c32650f)
2011-09-14tdb2: fix return handling in pytdb wrapper.Rusty Russell1-8/+10
tdb_close() does genuinely return non-zero, not an error code, even in tdb2. And tdb_exists() returns true or false, not an error code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-09-14tdb2: add error conversion functions.Rusty Russell12-91/+97
This clarifies the code a little, but also provides a more explicit mechanism which can be used to debug error handling (by introducing tdb_err_t and making it a pointer type). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit afa6d57b7d93fe4675a952f556eb462951baa257)
2011-09-14tdb2: set tdb_error() on tdb_transaction_prepare_commit.Rusty Russell1-1/+1
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit feb36b14278b4230af70dab90369a345b6a027ef)
2011-09-14tdb2: make tests work in parallel.Rusty Russell6-6/+6
Lazy cut & paste of tdb names causes failure when we run in parallel. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 380372e733416c2b348d5307f536d0a0807e95df)
2011-09-14tdb2: fix error handling for tdb1_transaction_commit.Rusty Russell1-1/+2
tdb_repack() returns an enum TDB_ERROR, whereas tdb1_transaction_commit is expected to return 0 or -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit b679512e4260b9847e2f846b07443e6907d8276f)
2011-09-14tdb2: don't return -1 (ie. TDB_ERR_CORRUPT) on transaction write fail.Rusty Russell1-1/+1
A left-over -1 return; should be returning ecode (probably TDB_ERR_IO). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 077bdae6877d26749987b26a1b5b28cdba5ebbdd)
2011-09-14tdb2: enhance tdb1 porting document.Rusty Russell1-0/+28
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 9cbae0f976118472f0065eee674eacf6ab4b80c5)
2011-09-14tdb2: delete old tdb1 tests.Rusty Russell2-394/+0
These two tdb1-specific tests have been superceded by the TDB_VERSION1 flags used in the main tests. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit e42097b73f6cd509aa17a48487a707401a2d4bd0)
2011-09-14tdb2: test: Speed up run-01-new_database.Rusty Russell2-7/+78
Don't run tdb_check with failtest on, since it is very slow. Do the tdb_check w/ failtest in a new test, but skip MMAP suppression which doesn't add much and slows down valgrind a lot. Before this change run-01-new_database took 40 seconds (under valgrind), after it takes 8 seconds, and run-12-check takes 3 seconds). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit b3ae89992ecaffed31dcc2e912539c289478801a)
2011-09-14tdb2: speed up testing.Rusty Russell2-5/+7
The time to run tests under valgrind has become excessive; particularly the failure tests which fork(). Thus we cut down testing: 1) api-94-repack: reduce from 234 seconds to 2 seconds by cutting iterations, despite adding TDB_VERSION1 tests. 2) api-missing-entries: reduce from 17 seconds to under 1 second by not checking db inside loop, but at end. This reduces the total ccanlint time from 729 to 489 seconds. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a99c2ccf97465d47c3277d997ea93f20ff97ad4d)
2011-09-14tdb2: test: convert (non-invasive) run tests to api tests.Rusty Russell23-23/+115
This reduces compilation time, since these are merely linked with the pre-built module, rather than recompiling it into the test (which allows for fancy things like failtest). This reduces the test compile time down from about 62 seconds to 45 seconds. Since ccanlint compiles tests three times (once normally, once with coverage, and once with reduced config.h) this makes a difference: we go from 780 seconds to 729 seconds. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit c4ca9f54301c0367891be6330f59fdd5dcdd51d1)
2011-09-14tdb2: test: fix run-57-die-during-transaction.c to be more efficient.Rusty Russell3-3/+18
We track malloc and free, but we didn't catch the free() inside external_agent, which means that our list of allocations keeps growing. Particularly under valgrind, which re-uses memory less than the glibc allocator. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit d9cbd7d4454ae35e4e2f6d18a9469bf26948e4b9)
2011-09-14tdb2: don't continue if tdb1_find fails.Rusty Russell1-16/+37
The TDB1 code's tdb1_find() returns 0 on error; the callers should not assume that the error means that the entry wasn't found, but use last_error to determine it. This was found by looking at how long the failure path testing for test/run-10-simple-store.c was taking under valgrind, ie: valgrind -q ./run-10-simple-store --show-slowest This change dropped the time for that test from 53 seconds to 19 seconds. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 1be090a2d749713cfd0c4584cafb97bffd716189)
2011-09-14tdb2: test: try (almost) all tests with TDB_VERSION1 flag.Rusty Russell33-128/+364
There are some minor changes required, in particular: 1) Make sure lockcheck understands tdb1 allrecord lock upgrades. 2) Handle tdb1 sequence number jumps: various operations increment the sequence number twice, especually tdb_append. 3) Don't test fail on unlock, since it gets triggered with traversal on the tdb1 backend (we didn't actually ever test this case for tdb2). 4) Move clear_if_first to offset 4, to match tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 818ed29730b030ce79855fc35c212b51adff3180)