summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-locking: Fork lock helper with vfork_with_logging()Martin Schwenke2014-09-122-41/+35
| | | | | | | | | | | | Otherwise errors printed by the lock helper get lost. lock_helper_args() no longer adds the program name to the list of arguments, since vfork_with_logging() does that. Update the lock helper to handle the extra log_fd parameter passed by vfork_with_logging() and send stdout/stderr there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-locking: Add argc parameter to lock_helper_args()Martin Schwenke2014-09-121-12/+16
| | | | | | | | | | | To make this sane, also add an argv parameter and change the return type to bool. Anticipating a subsequent change, make the type of argv match what is needed by vfork_with_logging() and cast it when passing to execv(). This also means changing the type of the name member of struct db_namelist. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* media_harmony: Fix a crash bugVolker Lendecke2014-09-121-2/+2
| | | | | | | | | | | | Now that the dust has settled, fix a crash bug that was hidden behind the warnings... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Sep 12 02:45:40 CEST 2014 on sn-devel-104
* media_harmony: Fix warningsVolker Lendecke2014-09-121-12/+9
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3: smbd - open logic fix.Jeremy Allison2014-09-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | As we atomically create using O_CREAT|O_EXCL, then if new_file_created is true, then file_existed *MUST* have been false (even if the file was previously detected as being there. We use the variable file_existed again in logic below this statement, so we must set file_existed = false, if new_file_created returns are true from open_file(). Based on a fix from Michael Adam. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Sep 11 22:29:22 CEST 2014 on sn-devel-104
* ctdb-locking: Set real-time priority for lock helpersAmitay Isaacs2014-09-111-0/+2
| | | | | | | | | | | | | | | | | To avoid lock helper starvation when userspace robust mutexes are enabled. Commit 6f072f85a138f595494dbec137bcf23d1e666acc removed reset_scheduler(), to avoid resetting scheduler priority. However, that is not sufficient because of commit 1be8564e553ce044426dbe7b3987edf514832940, which sets SCHED_RESET_ON_FORK flag. With SCHED_RESET_ON_FORK, all CTDB child processes will automatically have normal scheduling priority. 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): Thu Sep 11 11:31:10 CEST 2014 on sn-devel-104
* ctdb-daemon: Increment pending calls statistics correctlyAmitay Isaacs2014-09-111-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* torture: Provide enough space for test EA name in raw.eas testAndrew Bartlett2014-09-111-1/+1
| | | | | | | | | | | | | | | | The issue is that previously bad_ea_name[5] was the last element on the array, and so when we later did a strlen() on it, we read past the end of the stack array. We need bad_ea_name[5] to be the second-last element, followed by the \0 placed there by the strlcpy(). Found by AddressSanitizer Change-Id: I871c08200aa2591c612dfa44da92b83132f83d88 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Sep 11 08:50:16 CEST 2014 on sn-devel-104
* ctdb-build: Remove unnecessary lib/util include path from testsMartin Schwenke2014-09-111-3/+3
| | | | | | | | 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): Thu Sep 11 06:22:33 CEST 2014 on sn-devel-104
* 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-112-5/+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>
* vfs_acl_common: dacl size must be updatedRalph Boehme2014-09-111-0/+3
| | | | | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 11 03:54:42 CEST 2014 on sn-devel-104
* s3: smbd: Ensure we don't call qsort() with a size of -1.Jeremy Allison2014-09-111-16/+16
| | | | | | | | | | | Based on a patch idea from Ken Harris <kharris@mathworks.com> Fixes bug 10798 - crash in source3/smbd/notify.c https://bugzilla.samba.org/show_bug.cgi?id=10798 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* s3:smbd:open_file: use a more natural check.Michael Adam2014-09-111-1/+3
| | | | | | | As suggested by Jeremy Allison <jra@samba.org>. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture:base: slightly more generous timing in the defer_open testMichael Adam2014-09-101-1/+1
| | | | | | | | | | | | This copes with cases where the server is very busy and can't provide tortures more tight time scaling.. This is an attepmt to remove the flapping character of this test. Signed-off-by: Michael Adam <obnox@samba.org> Revieed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 10 21:51:42 CEST 2014 on sn-devel-104
* s3:smbd: fix a race in open codeMichael Adam2014-09-101-17/+42
| | | | | | | | | | | | | The race is when a file vanishes between existence check and acl check. In this case, open_file_ncreate() returns OBJECT_NAME_NOT_FOUND even if the create was called with disposition OPEN_IF. But in this case, the file should be created. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Fix a typoVolker Lendecke2014-09-101-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture: fix multi_smb_test child status tracking.Michael Adam2014-09-101-25/+62
| | | | | | | | | | | | | | | | | | | The original code in torture_start_procs() lost status of child status. So the affected test caseses (defer_open, ntdeny1, bench-torture, and also direct torture_start_proxy-user bench-nbench) were not always able to correctly detect and treat errors in the worker children. With this patch, torture_create_procs() correctly puts child result and reason into top level torture_result(), thereby in particular fixing remaining unexpected errors in the flapping deferopen test. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Sep 10 13:15:17 CEST 2014 on sn-devel-104
* s4:torture:base: add torture_comments to the loop of the deferopen test.Michael Adam2014-09-101-2/+34
| | | | | | | | This is to be able to better tell what went wrong if something went wrong. This is currently one of the main flapping tests. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:base: move i++ down in loop in run_deferopen()Michael Adam2014-09-101-1/+2
| | | | | | | | This is where it belongs, and it prepares subsequent patches. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* 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-build: Tests don't include lib/util/*.c, link ctdb-util insteadMartin Schwenke2014-09-103-23/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Drop lib/util from includesMartin Schwenke2014-09-101-3/+3
| | | | | | | | | | In is unnecessary and can accidentally cause lib/util/time.h to be found instead of /usr/include/time.h. The only things depending on it were bare includes of db_wrap.h and a bare include of dlinklist.h, which are both gone now. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Rename db_wrap to tdb_wrap and make it a build subsystemMartin Schwenke2014-09-1024-35/+45
| | | | | | | | | | | | | | | 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-102-17/+15
| | | | | | | | | 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-104-2/+2
| | | | | | | | 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-logging: Factor out ctdb_logging.h from includes.hMartin Schwenke2014-09-102-17/+42
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Add extra includes to help recursive utility compilationMartin Schwenke2014-09-101-0/+11
| | | | | | | | | Subsequent commits will introduce recursive compilation of utilities. Unfortunately the include file structure requires some global includes to be found, so make this work. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recoverd: Change include of dlinklist.h to contain directoryMartin Schwenke2014-09-101-1/+1
| | | | | | | | This makes it consistent with the rest of the code and avoids problems when some variant of lib/util isn't in the include path. 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-103-7/+6
| | | | | | | | 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-103-6/+3
| | | | | | | | 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-105-5/+9
| | | | | | | | | 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-client: Rename static function server_id_equal()Martin Schwenke2014-09-101-3/+6
| | | | | | | | | | Otherwise it conflicts with the same function provided by Samba's lib/util. Using the Samba one drags in too many dependencies, so rename the CTDB version to avoid a declaration clash when CTDB starts including samba_util.h. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-util: Remove declaration of non-existent ctdb_fault_setup()Martin Schwenke2014-09-101-2/+0
| | | | | 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-103-17/+16
| | | | | | | | | | 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-build: Fix includes for SAMBA_BINARY()sMartin Schwenke2014-09-101-3/+6
| | | | | | | | No need for "..", since the correct thing is generated. Add "include" and "include/internal" where missing. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Don't try to set lib64 directory automatically in buildMartin Schwenke2014-09-103-4/+9
| | | | | | | | | | | | | | Just install into lib/ and let packagers decide on this policy, since it can vary between distributions. Update our packaging files accordingly. A secondary matter is that things are incorrectly installed into lib64/ when building with 32-bit userspace on a 64-bit kernel. If this is done then it should depend on the architecture of the compiler. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Make ctdb-client depend on ctdb-util and ctdb-util-miscMartin Schwenke2014-09-101-7/+6
| | | | | | | | | The client code uses both of these, so might as well depend on it. That way code that depends on ctdb-client transitively get the dependencies. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-build: Allow configure and Makefile to find waf in tarballMartin Schwenke2014-09-102-2/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-common: Add some missing #includesMartin Schwenke2014-09-103-0/+5
| | | | | | | | To avoid warnings when using --enable-developer, which uses -Wmissing-prototypes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Move some inline declarations to header fileMartin Schwenke2014-09-102-2/+2
| | | | | | | | To avoid warnings when using --enable-developer, which uses -Wmissing-prototypes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Add missing declarations caused by #define magicMartin Schwenke2014-09-101-1/+30
| | | | | | | | | Some declarations get lost because they basically get #define-d away, so they need to be repeated after the #undef-s. Also, some functions are introduced due the #define-s. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: Mark some functions as staticMartin Schwenke2014-09-108-41/+48
| | | | | | | | To avoid warnings when using --enable-developer, which uses -Wmissing-prototypes. 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-106-123/+1
| | | | | | | 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-102-2/+3
| | | | | 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>
* docs-xml: Bump version up to 4.2.Karolin Seeger2014-09-0990-90/+90
| | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Sep 9 15:33:54 CEST 2014 on sn-devel-104
* WHATSNEW: Start release notes for Samba 4.2.0rc1.Karolin Seeger2014-09-091-253/+17
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:smbd: fix a comment typoRalph Boehme2014-09-091-1/+1
| | | | | | Signed-off-by: Ralph Boehme <rb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Move make_dir_struct() to reply.cVolker Lendecke2014-09-093-54/+46
| | | | | | | | This routine has nothing to do with dptr handling, it is SMB1 marshalling called only from reply_search(). Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>