summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* tdb2: suppress failtest more than once on mmap.Rusty Russell2011-12-051-0/+5
| | | | | | | | | | | | Now we test failing mmap, ccanlint -v time has increased from 200 to 330 seconds. Worse, tests no time out on my laptop. Fix this, by preventing us from going down that particular rabbit hole. ccanlint -v now takes 201 seconds again. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit fbae37ba91ec230e34be564084099726cc3a9d47)
* tdb2: simplify failtest helper.Rusty Russell2011-12-052-31/+3
| | | | | | | | | | | | | | | failtest now culls duplicates for itself (and more efficiently), so don't replicate the logic here. It changes things a bit, because failtest uses backtraces rather than a simple call point to find duplicates. Also, fix one case (in run-11-simple-fetch.c) where we simply exited rather than using failtest_exit(). We got away with it before, because we never hit that particular failure pattern. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 3d99c9334fe3067c88772547b9c06acec21616ea)
* tdb2: failtest: use a linked list for history, not an array.Rusty Russell2011-12-052-30/+26
| | | | | | | | | | This avoids a silly realloc, but more importantly it gets us closer to being runtime extensible, as each history element can be a different size. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 9571a41e8494f3135557e3ec50c2de856392173e)
* tdb2: consolidate testing failtest suppression routines.Rusty Russell2011-12-058-72/+14
| | | | | | | | Less cut & paste means less patching as failtest changes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 1819a36a3e69565bd7b853503fceb846558a45bd)
* tdb2: fix intermittant failure in run-50-multiple-freelists-fail.cRusty Russell2011-12-054-10/+18
| | | | | | | | | | layout.c's TDB creation functions were incorrect in case of a hash collision, causing occasional failure. Make it always use the (previously-failing) seed value, and fix it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 60a487d57979e4364e70c837079f3cf083ddc9c7)
* lib/ccan/cast: fix warnings with -Wextra (specifically ↵Rusty Russell2011-12-051-3/+3
| | | | | | | | | | -Wmissing-field-initializers) As noted by Jan Engelhardt; libHX fixed this already. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit b2cc1341c9464b6da4654fd3fa0aafe934fba578)
* lib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think ↵Rusty Russell2011-12-053-10/+10
| | | | | | | | | | | | | it means" Actually, I don't even think it means that. But rename it to something which is sane. Thanks to David Gibson for reporting. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit e764d0a27d2b6748ea7d343042ec7d6dda1f6aae)
* lib/ccan/asearch: fix example on 64 bit platforms.Rusty Russell2011-12-051-1/+1
| | | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit a8446c3ef94ae0d5f273656da12aa9a8b3abf658)
* lib/ccan/htable: benchmark against hsearch(3)Rusty Russell2011-12-053-2/+108
| | | | | | | | | Since that has a fixed hash table size and doesn't support delete, we can't do a thorough comparison, but we can insert and search. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 95757f0e9d979e7c653e9b53bb640deb4f0ea1f9)
* lib/ccan/likely: use htable_typeRusty Russell2011-12-053-66/+80
| | | | | | | | | | | | | Also general cleanups: (1) Don't assume that strings are folded by the compiler. (2) Implement likely_stats_reset(). (3) Return non-const string from likely_stats(), as caller must free it. (4) Don't use struct info indirection (that was from when we used callbacks?) (5) Close memory leak in run-debug.c Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 0e5d0e30b30bb07b6605843e5ff224210d8083d8)
* lib/ccan/htable: HTABLE_INITIALIZER() for static initialization.Rusty Russell2011-12-053-15/+29
| | | | | | | | | Unfortunately it's a bit of a pain to use for typed hashtables, but it works. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 60cc720d0797fc49325437ea36a9ffd909c75ed0)
* lib/ccan/htable: clean up interface, document htable_type better.Rusty Russell2011-12-059-254/+251
| | | | | | | | | | We change from htable_new()/htable_free() to htable_init/htable_clear. We also change HTABLE_DEFINE_TYPE() to be the full name, without automatically prepending htable_. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 0c3590dc33d644f73bb8587db454c491830aaf26)
* lib/ccan/htable: start empty.Rusty Russell2011-12-054-39/+87
| | | | | | | | There's no real reason to start with 128 entries. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 45f24da35118db441e6153f02f6ddd937da1fa1c)
* lib/ccan/htable, strset: benchmarking tools.Rusty Russell2011-12-055-1/+1104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us compare hash table vs. strset vs. the example implementation of critbit trees. cbspeed 100 runs, min-max(avg): #01: Initial insert: 236-245(237) #02: Initial lookup (match): 180-186(180) #03: Initial lookup (miss): 171-185(172) #04: Initial lookup (random): 441-457(444) #05: Initial delete all: 127-132(128) #06: Initial re-inserting: 219-225(220) #07: Deleting first half: 101-104(102) #08: Adding (a different) half: 158-162(159) #09: Lookup after half-change (match): 202-207(203) #10: Lookup after half-change (miss): 217-222(218) #11: Churn 1: 297-302(299) #12: Churn 2: 297-305(300) #13: Churn 3: 301-308(303) #14: Post-Churn lookup (match): 189-195(190) #15: Post-Churn lookup (miss): 189-193(190) #16: Post-Churn lookup (random): 499-513(503) speed 100 runs, min-max(avg): #01: Initial insert: 211-218(212) #02: Initial lookup (match): 161-166(162) #03: Initial lookup (miss): 157-162(158) #04: Initial lookup (random): 452-460(454) #05: Initial delete all: 126-135(127) #06: Initial re-inserting: 193-201(194) #07: Deleting first half: 99-107(99) #08: Adding (a different) half: 143-190(144) #09: Lookup after half-change (match): 183-195(184) #10: Lookup after half-change (miss): 197-203(198) #11: Churn 1: 271-278(274) #12: Churn 2: 280-287(282) #13: Churn 3: 277-285(279) #14: Post-Churn lookup (match): 171-175(171) #15: Post-Churn lookup (miss): 174-178(175) #16: Post-Churn lookup (random): 525-552(528) stringspeed 100 runs, min-max(avg): #01: Initial insert: 300-343(308) #02: Initial lookup (match): 98-136(99) #03: Initial lookup (miss): 73-102(75) #04: Initial lookup (random): 230-282(233) #05: Initial delete all: 66-102(69) #06: Initial re-inserting: 62-99(64) #07: Deleting first half: 43-52(43) #08: Adding (a different) half: 101-156(106) #09: Lookup after half-change (match): 114-156(120) #10: Lookup after half-change (miss): 94-103(95) #11: Churn 1: 98-105(99) #12: Churn 2: 96-104(98) #13: Churn 3: 174-184(176) #14: Post-Churn lookup (match): 93-112(94) #15: Post-Churn lookup (miss): 77-107(79) #16: Post-Churn lookup (random): 229-265(232) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 5c559e7df1d31b4c0ddf26451fac972dc8a0c2c9)
* lib/ccan/str: fix warnings.Rusty Russell2011-12-052-1/+5
| | | | | | | | | Firstly, -Wwrite-strings makes string literals const, secondly, we mustn't define str_strstr etc in terms of themselves! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 0845e79650c9257aa0ddef8ff99fd815b5edffac)
* lib/ccan/str: relicense to public domain.Rusty Russell2011-12-056-513/+2
| | | | | | | | LGPL is overkill for trivial wrappers like this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 942f2788e165bb203b0f160f29bd4592f32dc344)
* lib/ccan/typesafe_cb: fix example macro ordering in typesafe_cb_preargs ↵Rusty Russell2011-12-051-2/+2
| | | | | | | | documentation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 12652625db55f6586e95fc5edc73e1e85bae8a5c)
* lib/ccan/htable: fix tools/speed.Rusty Russell2011-12-051-2/+3
| | | | | | | | As pointed out by Christian Thaeter, it has bitrotted. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit f725bbb1987284933e0f21dfb8f2ce7a1f0806e5)
* lib/ccan/build_assert: Remove stale LGPL license comment.Joey Adams2011-12-051-1/+0
| | | | | | Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit d3d4303acd139e8c34f11067333c000a3f885307)
* lib/ccan/array_size: relicense under public domain.Rusty Russell2011-12-053-510/+1
| | | | | | | | It's just a header, I don't care what's done with it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit d06b67d244657da7054e3da580a771c365566d3c)
* Revert making public of the samba-module library.Jelmer Vernooij2011-12-037-144/+64
| | | | | | | | | | | | | | | This library was tiny - containing just two public functions than were themselves trivial. The amount of overhead this causes isn't really worth the benefits of sharing the code with other projects like OpenChange. In addition, this code isn't really generically useful anyway, as it can only load from the module path set for Samba at configure time. Adding a new library was breaking the API/ABI anyway, so OpenChange had to be updated to cope with the new situation one way or another. I've added a simpler (compatible) routine for loading modules to OpenChange, which is less than 100 lines of code. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 3 08:36:33 CET 2011 on sn-devel-104
* lib/util: factor out tdb_data_is_emptyGregor Beck2011-12-032-0/+5
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Sat Dec 3 05:20:30 CET 2011 on sn-devel-104
* tevent: Fix typo in build script.Jelmer Vernooij2011-12-031-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 3 02:15:40 CET 2011 on sn-devel-104
* Update ldb API sigs.Jelmer Vernooij2011-11-302-0/+258
|
* Bump ldb version to 1.1.4 after introduction of ldb_module_error.Jelmer Vernooij2011-11-301-1/+1
|
* socket_wrapper: use libreplace headers based on "#ifdef HAVE_LIBREPLACE"Michael Adam2011-11-251-3/+5
| | | | | | | instead of "#ifdef _SAMBA_BUILD_". This is to be able to use socket_wrapper in other projects that also use libreplace.
* socket_wrapper: simplify include path for replace.hMichael Adam2011-11-251-1/+1
|
* Remove unused variable.Jeremy Allison2011-11-241-1/+0
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Nov 24 00:17:41 CET 2011 on sn-devel-104
* Fix uninitialized variable frees on error paths.Jeremy Allison2011-11-231-11/+11
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 23 22:38:13 CET 2011 on sn-devel-104
* Ensure we don't free uninitialized variables.Jeremy Allison2011-11-231-2/+2
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Nov 23 02:27:53 CET 2011 on sn-devel-104
* s3 libaddns: Prevent a crash when dns_create_update failsKai Blin2011-11-221-1/+1
| | | | | | | | | | | | When dns_create_update() fails, it does not initialize *req, and then TALLOC_FREE(req) in the error handling crashes if we're lucky. Instead of going into the generic error handling, treat the failure in dns_create_update() like dns_create_update_request() and just pass on the error. Thanks to Harry Mason for reporting this issue. Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Tue Nov 22 14:29:07 CET 2011 on sn-devel-104
* Fix a bunch of "warning: variable ‘XXXX’ set but not used ↵Jeremy Allison2011-11-212-5/+2
| | | | | | | [-Wunused-but-set-variable]" warnings from the new gcc. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
* lib/param: add "SMB2_22" to enum_protocolStefan Metzmacher2011-11-201-0/+1
| | | | metze
* socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity codeMatthias Dieter Wallnöfer2011-11-191-0/+7
| | | | | Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104
* socket_wrapper: Added python interface to socket_wrapperAmitay Isaacs2011-11-173-0/+938
| | | | | | | | | | | The socket_wrapper does not support setting blocking flag or timeouts on the sockets. To use socket module in python, use from samba import socket Signed-off-by: Kai Blin <kai@samba.org>
* ldb: Add handy macros for reporting error inside ldb moduleAmitay Isaacs2011-11-171-0/+2
| | | | | | | Pair-Programmed-With: Andrew Tridgell <tridge@samba.org> Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Thu Nov 17 05:24:46 CET 2011 on sn-devel-104
* lib/param simplify server role values specified in smb.confAndrew Bartlett2011-11-171-5/+1
| | | | | | | | | The pdc/bdc split is only in smb.conf for Samba3 DCs, and so is too confusing to document in this paramter. It will be clearer to sort out "domain master" into a "pdc emulator" paramter to conver this distinction. Andrew Bartlett
* param: use lp_is_security_and_server_role_valid()Andrew Bartlett2011-11-171-5/+11
| | | | | | | This also permits a few more valid combinations, due to the layer at which this is being used. Andrew Bartlett
* param: Check if server role and security parameters are conflictingAmitay Isaacs2011-11-172-0/+40
|
* param: Connect lp_security to the lib/param code to allow testsAndrew Bartlett2011-11-171-0/+10
| | | | Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* param: Move enum values into a common (included) .c fileAndrew Bartlett2011-11-172-81/+113
| | | | | | | | | This #include hack is required as it is not possible to declare a compile-time sized array in a header file. Andrew Bartlett Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* param: move server role helpers into loadparm.hAndrew Bartlett2011-11-174-33/+5
| | | | Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* param: calculate server role from security, and security from server roleAndrew Bartlett2011-11-174-7/+201
| | | | | | | | | | | | | This allows smb.conf files from either the samba3 or samba4 tradition to come to the same value of server role, using the information in the smb.conf file. This is important so that tools like 'net getlocalsid' work against a Samba4 AD installation (yes, users have tried this). Andrew Bartlett Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* s3-param remove lp_domain_logons(), always use IS_DCAndrew Bartlett2011-11-171-1/+1
| | | | | | | | This makes the code internally consistant. Andrew Bartlett Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* param: make server role list common and include auto (for the new default)Andrew Bartlett2011-11-171-1/+9
| | | | Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
* param: Add "domain logons" and "domain master" parametersAmitay Isaacs2011-11-171-0/+20
| | | | | This makes parsing of config files with s3 loadparm code and s4 loadparm code consistent.
* lib/util/debug: with log level = 10 we should be more verboseStefan Metzmacher2011-11-161-3/+9
| | | | | | | | | | | | | | log level = 10 already impacts performance, so we can turn on more details and print the pid, [e][u|g]id and class information. So it implies "debug pid = yes", "debug uid = yes" and "debug class = yes". This generates a lot more useful log files. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 16 12:25:02 CET 2011 on sn-devel-104
* s3: allow to set TCP_NODELAYACK socket option on AIXBjörn Jacke2011-11-151-0/+3
| | | | | | | | this is the AIX way to disable delayed ACKs, the same like TCP_QUICKACK on Linux Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Tue Nov 15 21:00:07 CET 2011 on sn-devel-104
* waf: Factor checking for undefined symbol flags out into separate method.Jelmer Vernooij2011-11-134-0/+8
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Nov 13 19:38:38 CET 2011 on sn-devel-104
* pytdb: Shorter description which fits on a single line.Jelmer Vernooij2011-11-131-1/+2
|