summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* s3:smbd: close the connection if the client doesn't start with a SMB1 ↵Stefan Metzmacher2014-09-091-0/+18
| | | | | | | | | | | | | | | Negprot or old messaging call. The case where the client starts with a SMB2 Negprot is already handled in smbd_smb2_request_dispatch(). Bug: https://bugzilla.samba.org/show_bug.cgi?id=10766 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 9 13:02:21 CEST 2014 on sn-devel-104
* Revert "buildtools: Rename perl vendorarch configure option."Michael Adam2014-09-091-9/+4
| | | | | | | | | | | | | | | This reverts commit 04685ff4eed9535769d6a5feee7353f1796a4389. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 9 03:07:20 CEST 2014 on sn-devel-104
* Revert "buildtools: Add perl vendorlib configure option."Michael Adam2014-09-091-10/+0
| | | | | | | | | | | | This reverts commit 48f0183dbeddd7bdf333a40fe0d3e1c7e7fe00f2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "wafsamba: If perl can't provide defaults, define them."Michael Adam2014-09-091-8/+2
| | | | | | | | | | | | This reverts commit 0ba276ebad57d75a769e22414f94acbe8c177d97. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs."Michael Adam2014-09-091-39/+19
| | | | | | | | | | | | This reverts commit 2637890ef42a238093f0f3cbdda0d621d5f9b2e2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* pidl/wscript: remove --with-perl-* optionsStefan Metzmacher2014-09-091-1/+1
| | | | | | | | | These are not needed anymore as we have useful defaults now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: basic FSCTL_SET_ZERO_DATA testsDavid Disseldorp2014-09-081-0/+180
| | | | | | | | | | | | | | Attempt to punch holes in a file using FSCTL_SET_ZERO_DATA. Check that the resulting data is zeroed. Also confirm that when the file is marked sparse, the zeroed range is no longer allocated. Finally, check that removing the sparse flag causes any holes to be unsparsed. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Sep 8 21:40:34 CEST 2014 on sn-devel-104
* torture: add file zero-range checkerDavid Disseldorp2014-09-081-0/+30
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: malformed FSCTL_QUERY_ALLOCATED_RANGES testsDavid Disseldorp2014-09-081-0/+78
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: basic FSCTL_QUERY_ALLOCATED_RANGES testDavid Disseldorp2014-09-081-0/+191
| | | | | | | | Add a test and helper function for FSCTL_QUERY_ALLOCATED_RANGES requests. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: split pattern write into helper functionDavid Disseldorp2014-09-081-17/+38
| | | | | | | | This allows for patterned writes after file creation, as needed for sparse file integrity testing. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: test oversize FSCTL_SET_SPARSE requestDavid Disseldorp2014-09-081-0/+76
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Correctly initialize array sizeVolker Lendecke2014-09-081-2/+2
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10800 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 8 16:41:51 CEST 2014 on sn-devel-104
* samba-tool: fix reply when zero day pwd expiry is setBjörn Jacke2014-09-081-4/+4
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10318 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Mon Sep 8 14:15:51 CEST 2014 on sn-devel-104
* s3: smbd: smb2-sessionsetup. Fix use after free when the sessionsetup ↵Jeremy Allison2014-09-081-0/+6
| | | | | | | | | | request state is freed before struct smbXsrv_session struct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Sep 8 09:52:23 CEST 2014 on sn-devel-104