Volker Lendecke [Fri, 30 Mar 2018 17:32:26 +0000 (12:32 -0500)]
libhttp: Fix CID
1273001 Dereference after null check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 23 Mar 2018 09:52:54 +0000 (10:52 +0100)]
wafsamba: Add missing cflags_end argument to SAMBA_BINARY
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 3 23:08:33 CEST 2018 on sn-devel-144
Andreas Schneider [Fri, 23 Mar 2018 09:18:17 +0000 (10:18 +0100)]
s3:modules: Set -Wno-strict-overflow for getdate if supported
bison generates an C89 files which does some weired things.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 23 Mar 2018 15:27:00 +0000 (16:27 +0100)]
replace: Check for -Wno-strict-overflow
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 23 Mar 2018 09:14:50 +0000 (10:14 +0100)]
wafsamba: Add missing cflags_end argument to SAMBA_MODULE
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 23 Mar 2018 08:30:27 +0000 (09:30 +0100)]
s3:modules: Generate new getdate.c with bison
bison -o source3/modules/getdate.c source3/modules/getdate.y<Paste>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Fri, 23 Mar 2018 08:29:55 +0000 (09:29 +0100)]
s3:modules: Update getdate.y to work with newer bison versions
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 17:36:13 +0000 (18:36 +0100)]
s3:torture: Fix size types in make_nonstd_fd()
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 13:51:28 +0000 (14:51 +0100)]
s3:client: Fix size types
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 13:06:34 +0000 (14:06 +0100)]
s3:spoolss: Fix size types
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 12:41:39 +0000 (13:41 +0100)]
s3:printing: Fix size types
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 10:49:18 +0000 (11:49 +0100)]
s3:smbd: Fix size types in reply_negprot()
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 16:46:30 +0000 (17:46 +0100)]
s4:torture: Fix size types in torture_create_procs()
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 12:02:26 +0000 (13:02 +0100)]
heimdal: Fix size types and array access
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 09:28:02 +0000 (10:28 +0100)]
s4:client: Fix size types and loop
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 15:46:49 +0000 (16:46 +0100)]
s4:registry: Fix size type and loop
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 11:49:38 +0000 (12:49 +0100)]
lib:util: Fix size types in fgets_slash()
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 13:32:49 +0000 (14:32 +0100)]
third_party: Fix size type in cmocka
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 15:25:30 +0000 (16:25 +0100)]
ldb: Fix overflow checks
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 22 Mar 2018 08:53:03 +0000 (09:53 +0100)]
ldb: Add test for ldb_qsort()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 21 Mar 2018 16:19:39 +0000 (17:19 +0100)]
third_party: Update pam_wrapper to version 1.0.6
This fixes compilation with -Wstrict-overflow=2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Wed, 21 Mar 2018 06:48:16 +0000 (07:48 +0100)]
s3:modules: fix the build of vfs_aixacl2.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13345
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 3 20:18:58 CEST 2018 on sn-devel-144
Stefan Metzmacher [Wed, 21 Mar 2018 06:33:16 +0000 (07:33 +0100)]
ldb/tests: avoid 'return void_function();' which isn't portable
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Wed, 21 Mar 2018 06:33:16 +0000 (07:33 +0100)]
lib/crypto: avoid 'return void_function();' which isn't portable
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Wed, 21 Mar 2018 06:25:11 +0000 (07:25 +0100)]
s3:modules: make virusfilter_io_connect_path() more portable
We have existing utility functions to prepare a socket.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Tue, 20 Mar 2018 11:10:01 +0000 (12:10 +0100)]
s3:modules: fix the picky-developer build of vfs_virusfilter.c on FreeBSD 11
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Sat, 21 Oct 2017 12:15:12 +0000 (14:15 +0200)]
nsswitch: fix the developer build of nsswitch/wins.c on freebsd 11
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Sat, 21 Oct 2017 12:14:34 +0000 (14:14 +0200)]
nsswitch: add some const to _nss_winbind_initgroups_dyn() prototype
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Sat, 21 Oct 2017 12:08:15 +0000 (14:08 +0200)]
nsswitch: maintain prototypes for the linux based functions only once
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Tue, 20 Mar 2018 20:46:12 +0000 (21:46 +0100)]
lib/replace: define __[u]intptr_t_defined if we prove an replacement
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Stefan Metzmacher [Tue, 20 Mar 2018 15:49:30 +0000 (16:49 +0100)]
lib/util: remove unused '#include <sys/syscall.h>' from tests/tfork.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13342
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Amitay Isaacs [Wed, 28 Mar 2018 23:45:19 +0000 (10:45 +1100)]
ctdb-scripts: Drop "net serverid wipe" from 50.samba event script
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13359
There is no serverid database anymore.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Mar 31 08:34:00 CEST 2018 on sn-devel-144
Swen Schillig [Thu, 8 Feb 2018 11:19:09 +0000 (12:19 +0100)]
ctdb-server: Only set destructor if required
Set the detructor in ctdb_start_revoke_ro_record after the revokechild_handle
was added to the list.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar 31 03:45:51 CEST 2018 on sn-devel-144
Swen Schillig [Thu, 8 Feb 2018 11:08:45 +0000 (12:08 +0100)]
ctdb-server: Add goto tag avoiding code duplication
Introduced err_out goto tag to prevent code duplication.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Thu, 8 Feb 2018 10:57:23 +0000 (11:57 +0100)]
ctdb-server: Minor code cleanup
Cleanup ctdb_start_revoke_ro_record to improve readability.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Wed, 31 Jan 2018 12:06:30 +0000 (13:06 +0100)]
ctdb-server: Replace the variable rc by something meaningful
Replace the varibale name "rc" in ctdb_start_revoke_ro_record
to prevent a mix-up with the common meaning of rc (return code).
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Tue, 20 Feb 2018 16:08:59 +0000 (17:08 +0100)]
ctdb-server: Only talloc_set_destructor when required
The destructor is only needed once the state got added to the DLIST.
Therefore, move the setting of the destructor to after the addition
of state to the DLIST.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Thu, 8 Feb 2018 10:33:08 +0000 (11:33 +0100)]
ctdb-server: Cleanup ctdb_daemon_call_send_remote
Minor code cleanup and adding a temporary variable to improve readabilty.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Wed, 21 Feb 2018 12:52:11 +0000 (13:52 +0100)]
ctdb: Use talloc_zero instead of zeroing attributes
Zero entire structure with talloc_zero on memory allocation instead of
setting each attribute individually.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Wed, 21 Feb 2018 12:34:28 +0000 (13:34 +0100)]
ctdb: Use provided mem_ctx for newly allocated memory
ctdb_call_local is called with a mem_ctx parameter which should be used
for newly allocated memory.
This is safe because all allocations of this context are freed before
this function returns.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Tue, 13 Mar 2018 08:34:52 +0000 (09:34 +0100)]
ctdb: Fixing possible memory leak in ctdb_tcp_read_cb
In case of an error condition the further processing of the data is cancelled
and the callback returns. In such a scenario the data has to be free'd.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Tue, 13 Mar 2018 08:42:24 +0000 (09:42 +0100)]
ctdb: Fixing memory leak in ctdb_tcp_tnode_cb
It is expected by the caller(queue_process) that the callback is
free'ing the memory referenced by the data pointer.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Swen Schillig [Tue, 13 Mar 2018 08:06:45 +0000 (09:06 +0100)]
ctdb: Fixing possible memory leak in ctdb_daemon_read_cb
In case of an error condition the further processing of the data is cancelled
and the callback returns. In such a scenario the data has to be free'd.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jones Syue [Fri, 30 Mar 2018 00:31:06 +0000 (08:31 +0800)]
s4:torture: kernel oplocks. Fix assertion warning
Simply boolean 'ret' instead of 'ret = true'.
Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Mar 30 18:39:19 CEST 2018 on sn-devel-144
Ralph Boehme [Thu, 29 Mar 2018 18:06:47 +0000 (20:06 +0200)]
s3:smbd: don't use the directory cache for SMB2/3
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13363
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Mar 30 03:51:48 CEST 2018 on sn-devel-144
Jeremy Allison [Wed, 28 Mar 2018 20:19:12 +0000 (13:19 -0700)]
s4: torture: Test all combinations of directory open with existing directory to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 29 23:13:42 CEST 2018 on sn-devel-144
Jeremy Allison [Wed, 28 Mar 2018 20:17:14 +0000 (13:17 -0700)]
s4: torture: Test all combinations of directory create to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Jeremy Allison [Wed, 28 Mar 2018 18:44:40 +0000 (11:44 -0700)]
s4: torture: Test all combinations of file open with existing file to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Jeremy Allison [Wed, 28 Mar 2018 18:00:59 +0000 (11:00 -0700)]
s4: torture: Test all combinations of file create to ensure behavior is the same.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Jeremy Allison [Wed, 28 Mar 2018 17:54:30 +0000 (10:54 -0700)]
s4: torture: Ensure a failed file create doesn't create the file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Jeremy Allison [Wed, 28 Mar 2018 19:42:20 +0000 (12:42 -0700)]
s3: smbd: Files or directories can't be opened DELETE_ON_CLOSE without delete access.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Volker Lendecke [Wed, 28 Mar 2018 12:27:08 +0000 (07:27 -0500)]
libads: Fix CID
1349423 Resource leak
get_sorted_dc_list should already take care, but this way it's safer
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 29 03:45:00 CEST 2018 on sn-devel-144
Volker Lendecke [Wed, 28 Mar 2018 12:24:01 +0000 (07:24 -0500)]
net: Fix CID
1128559 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 28 Mar 2018 12:22:02 +0000 (07:22 -0500)]
smbstatus: Fix CID
1128560 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 28 Mar 2018 12:17:59 +0000 (07:17 -0500)]
vfs_fruit: Fix CID
1433613 Operands don't affect result
Two changes: First, we can't check multiplication overflow after the
operation. This has to be done before with a division. Second, there
is no OFF_T_MAX, and both operands are size_t, so check for
SIZE_MAX. The result is assigned to off_t, but I'm not sure where the
automatic coercion from size_t to off_t would happen.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 28 Mar 2018 12:10:59 +0000 (07:10 -0500)]
dsdb: Fix CID
1433614 Dereference after null check
This whole routine assumes module!=NULL, both in the successful as
well as in error cases. So checking for module!=NULL is confusing both
the reader as well as Coverity.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 28 Mar 2018 12:00:34 +0000 (07:00 -0500)]
libads: Fix
1433611 Resource leak
Not really a memleak due to the passed-in talloc ctx, but this way it's cleaner
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 27 Mar 2018 22:03:15 +0000 (17:03 -0500)]
lsa_server: Fix CID
1433608 Dereference after null check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 27 Mar 2018 22:00:46 +0000 (17:00 -0500)]
libads: Fix CID
1433606 Dereference before null check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 26 Mar 2018 10:02:01 +0000 (12:02 +0200)]
ndr_string: Do overflow checks in ndr_push/pull_charset
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Mar 28 16:08:16 CEST 2018 on sn-devel-144
Volker Lendecke [Mon, 26 Mar 2018 10:00:40 +0000 (12:00 +0200)]
ndr_string: Fix a signed/unsigned glitch
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Martin Schwenke [Tue, 20 Mar 2018 09:20:55 +0000 (20:20 +1100)]
ctdb-tests: Delete unused fake /etc/sysconfig/ctdb file
The only remaining item is a setting of CTDB_DEBUGLEVEL, which is not
required.
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 Mar 28 07:27:58 CEST 2018 on sn-devel-144
Martin Schwenke [Tue, 20 Feb 2018 07:22:33 +0000 (18:22 +1100)]
ctdb-scripts: Tunables are now loaded from ctdb.tunables
Using CTDB_SET_TunableVariables in the main configuration file is no
longer supported.
The only subtlety is an unexpected order change in one of the unit
test results. This is because the old implementation implicitly
sorted the tunable variables via the set command.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 22 Mar 2018 03:39:45 +0000 (14:39 +1100)]
ctdb-tests: Rename setup_config() to setup_tunable_config()
Drop the "CTDB_SET_" prefix from variable names and add it back for
now. When there is a better way of setting tunables then this
function will support that.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 19 Feb 2018 03:58:48 +0000 (14:58 +1100)]
ctdb-tests: Script options into per-script file
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 20 Feb 2018 01:56:42 +0000 (12:56 +1100)]
ctdb-scripts: Use load_script_options in event scripts
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 19 Feb 2018 02:13:26 +0000 (13:13 +1100)]
ctdb-scripts: Add new function load_script_options()
For now this loads the global CTDB configuration too. This will
change in the future after things are properly modularised.
This also anticipates a future change where event scripts end with a
".script" suffix.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 22 Mar 2018 00:36:46 +0000 (11:36 +1100)]
ctdb-tests: Use setup_script_options() in 91.lvs tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 22 Mar 2018 01:05:10 +0000 (12:05 +1100)]
ctdb-tests: Use setup_script_options() in 60.nfs (and 06.nfs) tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 22 Mar 2018 01:03:56 +0000 (12:03 +1100)]
ctdb-tests: Use setup_script_options() in 50.samba tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 22 Mar 2018 00:17:47 +0000 (11:17 +1100)]
ctdb-tests: Use setup_script_options() in 49.winbind tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 20:19:14 +0000 (07:19 +1100)]
ctdb-tests: Use setup_script_options() in 41.httpd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 20:16:02 +0000 (07:16 +1100)]
ctdb-tests: Use setup_script_options() in 40.vsftpd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 20:11:59 +0000 (07:11 +1100)]
ctdb-tests: Use setup_script_options() in 31.clamd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 20:04:49 +0000 (07:04 +1100)]
ctdb-tests: Use setup_script_options() in 20.multipathd tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 20:01:08 +0000 (07:01 +1100)]
ctdb-tests: Use setup_script_options() in 13.per_ip_routing tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 19:56:18 +0000 (06:56 +1100)]
ctdb-tests: Use setup_script_options() in 11.natgw tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 11:21:46 +0000 (22:21 +1100)]
ctdb-tests: Use setup_script_options() in 10.interface tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 21 Mar 2018 11:18:56 +0000 (22:18 +1100)]
ctdb-tests: Use setup_script_options() in 05.system tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 8 Feb 2018 01:18:56 +0000 (12:18 +1100)]
ctdb-tests: New function setup_script_options()
Currently exports the variable assignment on each line. Later this
can be changed to handle actual per-script configuration.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 6 Feb 2018 00:25:56 +0000 (11:25 +1100)]
ctdb-scripts: Split CTDB configuration loading
loadconfig() currently tries to load the CTDB configuration and also
any system configuration relevant to the current (event) script.
Instead add a new function load_system_config() to load the
distribution-specific system configuration for a component. Call this
directly in the rare scripts that need the system configuration.
Also call load_system_config when loading the CTDB configuration to
pull in anything from the CTDB system configuration. This is partly
for backward compatibility but also to get options that can be used
anywhere.
loadconfig() no longer takes an argument. It simply loads the CTDB
configuration.
Drop support for falling back to /etc/ctdb/sysconfig/ctdb (or
similar). Surely there's nobody who uses that!
Also, drop the indirection where loadconfig() calls _loadconfig().
This was used years ago as a test hook and is no longer required.
Inexplicably, this change introduces a new shellcheck test failure, so
silence this.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 19 Feb 2018 04:32:02 +0000 (15:32 +1100)]
ctdb-docs: Promote CTDB_INIT_STYLE to global options section
Clarify that the global options should be set in the system
configuration file.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 19 Feb 2018 04:29:43 +0000 (15:29 +1100)]
ctdb-scripts: Clean up function detect_init_style()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 19:55:35 +0000 (06:55 +1100)]
ctdb-tests: Remove unused functions and stubs
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 13 Feb 2018 00:17:46 +0000 (11:17 +1100)]
ctdb-tests: statd-callout script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 05:46:17 +0000 (16:46 +1100)]
ctdb-tests: 91.lvs event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 19:53:44 +0000 (06:53 +1100)]
ctdb-tests: 60.nfs (and 06.nfs) event script setup modularisation
Includes gratuitous changes to get lines below 80 columns.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 05:25:15 +0000 (16:25 +1100)]
ctdb-tests: 50.samba event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 03:10:12 +0000 (14:10 +1100)]
ctdb-tests: 49.winbind event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 03:02:20 +0000 (14:02 +1100)]
ctdb-tests: 41.httpd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 02:47:56 +0000 (13:47 +1100)]
ctdb-tests: 40.vsftpd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 02:58:42 +0000 (13:58 +1100)]
ctdb-tests: 31.clamd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 02:40:42 +0000 (13:40 +1100)]
ctdb-tests: 20.multipathd event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 02:37:02 +0000 (13:37 +1100)]
ctdb-tests: 13.per_ip_routing event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 12 Feb 2018 00:42:04 +0000 (11:42 +1100)]
ctdb-tests: 11.natgw event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 8 Feb 2018 11:01:49 +0000 (22:01 +1100)]
ctdb-tests: 10.interface event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 7 Feb 2018 19:54:27 +0000 (06:54 +1100)]
ctdb-tests: 05.system event script setup modularisation
Do initial test setup using setup() function. Rename usage setting
functions to make them more obvious.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 7 Feb 2018 19:24:01 +0000 (06:24 +1100)]
ctdb-tests: 01.reclock event script setup modularisation
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 7 Feb 2018 19:04:58 +0000 (06:04 +1100)]
ctdb-tests: 00.ctdb testing setup modularisation
Switch to generic setup() function and set variables there.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Wed, 7 Feb 2018 19:00:25 +0000 (06:00 +1100)]
ctdb-tests: Define generic setup() function
Create default setup() function that aborts. This function will be
redefined by each support script and used to do the setup.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>