summaryrefslogtreecommitdiffstats
path: root/ctdb/lib
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-build: Change from ctdb-util to samba-utilMartin Schwenke2014-10-0615-2275/+0
| | | | | | | | | | | | | | | | | | Remove local lib/util and lib/tdb-wrap. Update wscript, packaging and includes.h. The only potentially surprising thing here is a fake samba-util subsystem that just depends on samba-util-core. As explained in a comment: When a combined build is implemented, CTDB will wanted to build against samba-util rather than samba-util-core. Similarly, other Samba subsystems expect samba-util. So, for a standalone build, just define a fake samba-util subsystem that pulls in samba-util-core. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb-logging: Update to use Samba style debug.h/debug.cMartin Schwenke2014-10-063-78/+75
| | | | | | | | | | | | | | | | | | | | | Samba's debug subsystem has changed a lot, so CTDB's logging needs to be rewritten to be compatible. The new debug.h/debug.c can't just be pulled in because it has some extra dependencies into Samba's lib/util. For now, to support the smallest possible patch, implement a minimal subset of Samba's debug.[ch] that just supports the DEBUG_CALLBACK logtype. Define a callback for each logging method. Check later to see if debug_extra (or similar) can somehow be implemented using debug classes. The timestamp on CTDB CLI tool and test program DEBUG() output goes away, so update the unit test code to cope. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb-logging: Remove log ringbufferMartin Schwenke2014-10-061-1/+0
| | | | | | | | | | | As far as we know, nobody uses this and it just complicates the logging subsystem. Remove all ringbuffer code and documentation. Update the local daemons startup code correspondingly. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib: util [ctdb]: Signal handling - change CatchChild() and ↵Jeremy Allison2014-09-302-6/+6
| | | | | | | | | | | CatchChildLeaveStatus() to return the previous handler. Bug #10831 - SIGCLD Signal handler not correctly reinstalled on old library code use - smbrun etc. https://bugzilla.samba.org/show_bug.cgi?id=10831 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib/util: Do not duplicate the protocol list, use smb_constants.hAndrew Bartlett2014-09-291-11/+1
| | | | | | | | | This avoids the two lists getting out of sync, and only applies to a Samba build due to the surrounding #ifdef Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-build: Add missing configure checks for backtraceAmitay Isaacs2014-09-191-1/+1
| | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Fri Sep 19 06:06:31 CEST 2014 on sn-devel-104
* lib: Remove unused file_lines_slashcontVolker Lendecke2014-09-171-6/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Move "large_file_support()" to the source4 smb serverVolker Lendecke2014-09-171-1/+0
| | | | | | | That's the only place where it's used, make it static there. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* ctdb-util: Clean up dependenciesMartin Schwenke2014-09-111-2/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-includes: Remove some unnecessary declarationsMartin Schwenke2014-09-111-2/+0
| | | | | | | | To accommodate removing file_lines_load() from here, drop the #ifdef around the declaration in util.h. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Make tdb_wrap self-sufficient - it doesn't need includes.hMartin Schwenke2014-09-102-2/+8
| | | | | | | | | | | It should use finer grained includes like replace.h and ctdb_logging.h. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Sep 10 04:03:20 CEST 2014 on sn-devel-104
* ctdb-util: Rename db_wrap to tdb_wrap and make it a build subsystemMartin Schwenke2014-09-104-12/+19
| | | | | | | | | | | | | | | This makes it consistent with Samba, to ease transition. Update unit test code to link to with tdb_wrap instead of including db_wrap.c. There are some potential whitespace fixes in this commit that have been ignored. CTDB's lib/tdb_wrap will be deleted after the transition to Samba's lib/tdb_wrap, so there's no point polishing it too much. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Make ctdb-util a wscript build subsystemMartin Schwenke2014-09-101-0/+10
| | | | | | | | | This makes it look similar to samba-util, easing the transition. Fold ctdb-util-misc into ctdb-util, since Samba doesn't separate them. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-logging: Move variable debug_extra from debug.*Martin Schwenke2014-09-102-2/+0
| | | | | | | | debug_extra is CTDB-specific. Moving it will help with the transitions to Samba's updated debug.[ch]. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tools: Move definition of timeval_delta() to tools/ctdb.cMartin Schwenke2014-09-101-6/+0
| | | | | | | | This function is only used in this file. Samba's lib/util doesn't have timeval_delta(), so staging a clean transition. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Drop the argument to fault_setup()Martin Schwenke2014-09-102-5/+2
| | | | | | | | Samba's version doesn't accept an argument, so this aids a smooth transition. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Add extra max_size argument to file_lines_load()Martin Schwenke2014-09-101-1/+5
| | | | | | | | | This is part of a migration to Samba's lib/util. CTDB always passes 0 (i.e. no max_size) so use a simple assert() to enforce this, rather than changing a lot of code that will be discarded anyway. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Move hex_decode_talloc() to the lock helperMartin Schwenke2014-09-101-16/+0
| | | | | | | | | | This is the only place it is used. After migrating to Samba's lib/util, the lock helper can be changed to use strhex_to_data_blob(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Remove util/strlist.c and references to str_util_*()Martin Schwenke2014-09-102-119/+0
| | | | | | | They're not used in CTDB. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: Fix some "declarations after code" problemsMartin Schwenke2014-09-101-1/+1
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Variables should be declared extern in headersMartin Schwenke2014-09-101-3/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Remove autoconf build filesAmitay Isaacs2014-06-202-16/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-header: Protect against multiple includesAmitay Isaacs2014-06-201-0/+4
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate socket_wrapper libraryAmitay Isaacs2014-06-206-2981/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate tdb libraryAmitay Isaacs2014-06-2086-17723/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate tevent libraryAmitay Isaacs2014-06-2039-11795/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate talloc libraryAmitay Isaacs2014-06-2044-11915/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate replace libraryAmitay Isaacs2014-06-2072-15062/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-build: Remove duplicate popt libraryAmitay Isaacs2014-06-2014-3340/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb:build: fix building with external libtdbMichael Adam2014-06-161-7/+7
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* lib-util: rename memdup to smb_memdup and fix all callersBjörn Baumbach2014-04-161-1/+1
| | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org>
* auth: Remove plaintext OSF1 password supportAndrew Bartlett2014-04-151-3/+0
| | | | | | | | The WAF build does not have the code to detect getprpwnam on which this is based, and so this is dead code. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dlinklist: Fix a typoVolker Lendecke2014-04-022-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Apr 2 17:11:37 CEST 2014 on sn-devel-104
* samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4Matthias Dieter Wallnöfer2014-01-091-4/+0
| | | | | | | | | http://www.python.org/doc//current/c-api/none.html Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date(master): Thu Jan 9 16:27:47 CET 2014 on sn-devel-104
* Fix CID 1138340 Resource leakVolker Lendecke2013-12-171-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix CID 1138341 Resource leakVolker Lendecke2013-12-171-0/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* db_wrap: Make sure tdb messages are logged correctlyAmitay Isaacs2013-08-141-0/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 60cb40d090e45ff6134c098a238fac7ad854f134)
* build: Fix tdb.h path to enable building with system TDB libraryMathieu Parent2013-06-141-1/+1
| | | | (This used to be ctdb commit f8bf99de3a5f56be67aaa67ed836458b1cf73e86)
* tevent: Sync to tevent 0.9.18 from upstreamAmitay Isaacs2013-05-2928-726/+3782
| | | | (This used to be ctdb commit 82d61f77c01df0fbb42743593937b175ce22a445)
* replace: Sync to latest replace from upstreamAmitay Isaacs2013-05-2941-4745/+1599
| | | | | | | | | | | | | The latest commits affecting lib/replace remove autoconf build from Samba tree. So using following commit as a sync point. commit 9ddfd7d8784e6f546628f48990b69ee2850be52d Author: Andrew Bartlett <abartlet@samba.org> Date: Wed May 22 17:23:30 2013 +1000 Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 506b27c944b4031e8a325816bd12abddd442a0bb)
* tdb: Sync to tdb 1.2.11 from upstreamAmitay Isaacs2013-05-2965-47/+6474
| | | | (This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
* talloc: Sync to talloc 2.0.8 from upstreamAmitay Isaacs2013-05-2938-309/+3034
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 3bffca8c17e441364525df115ee2ac16b5969e24)
* util: Do not stop build if backtracing is not supportedAmitay Isaacs2013-05-291-2/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit b091f09ea01482823bd850d1d4e2329e0a19c959)
* build: Fix for tevent autoconf checkSumit Bose2013-03-271-1/+1
| | | | | | The list of include files is the 4th argument of AC_CHECK_DECLS. (This used to be ctdb commit 85b777196289646ca37e06ebbf1f7a684d0aabc5)
* util: Add hex_decode_talloc() to decode hex string into a binary blobAmitay Isaacs2013-03-251-0/+16
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 307416afda707b687f5e89e8438e45c154a4c806)
* build: Fix the build with old system-installed teventVolker Lendecke2012-11-081-1/+4
| | | | | | We depend on the tracing callback mechanism in ctdb. (This used to be ctdb commit 5f58c811127a89f162b6a41ddcd6e944801740a5)
* tevent: change version to 0.9.16Stefan Metzmacher2012-06-121-0/+82
| | | | | | | | | | | This adds tevent_*_trace_*() and tevent_context_init_ops() metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 8 20:47:41 CEST 2012 on sn-devel-104 (This used to be ctdb commit 0dc204988eadff214dd149a756d756ab6e96e410)
* tevent: expose tevent_context_init_opsStefan Metzmacher2012-06-122-3/+19
| | | | | | | | | | This can be used to implement wrapper backends, while passing a private pointer to the backens init function via ev->additional_data. metze (This used to be ctdb commit 7ebc00dc6a89043a971a720e7c21baf5f2a0233d)
* lib/tevent: Add trace point callbackMartin Schwenke2012-06-127-0/+83
| | | | | | | | | | | | | | Set/get a single callback function to be invoked at various trace points. Define "before wait" and "after wait" trace points - more trace points can be added later if required. CTDB wants this to log long waits and events. Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit cb2bbe93628c1ab932c2e1ad6e2ec199a98f74c6)
* Revert "TEVENT: Add back tracking of long runnig events to the local copy ↵Martin Schwenke2012-06-125-66/+0
| | | | | | | | | | of tevent library" This reverts commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00. Do this using new tevent trace point callback. (This used to be ctdb commit 88040778aace229d724de1ba7556aded12e22f86)