]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agoctdb-recoverd: Drop unused nodemap argument from update_flags_on_all_nodes()
Martin Schwenke [Thu, 18 Jan 2018 09:25:07 +0000 (20:25 +1100)] 
ctdb-recoverd: Drop unused nodemap argument from update_flags_on_all_nodes()

An unused argument needlessly extends the length of function calls.  A
subsequent change will allow rec->nodemap to be used if necessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability/quality
Martin Schwenke [Thu, 5 Mar 2020 18:10:05 +0000 (05:10 +1100)] 
ctdb-tests: Improve test portability/quality

Avoid use of non-portable md5sum by constructing database names using
index.  Improve indentation, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 22 09:14:35 UTC 2020 on sn-devel-184

5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 10:53:33 +0000 (21:53 +1100)] 
ctdb-tests: Improve test quality

Simplify code, use more modern commands, code improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 10:48:59 +0000 (21:48 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces, so
strip them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 09:42:01 +0000 (20:42 +1100)] 
ctdb-tests: Improve test quality

Select test node with IPs instead of using a fixed node.  Remove
unnecessary code, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 09:21:26 +0000 (20:21 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces and
stops "$num from being a number.  Create a more portable solution and
put it in a function instead of repeating the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Drop uses of "onnode any ..." in testcases
Martin Schwenke [Tue, 10 Dec 2019 00:33:02 +0000 (11:33 +1100)] 
ctdb-tests: Drop uses of "onnode any ..." in testcases

It would be nice to get rid of "onnode any".  There's no use making
tests nondeterministic.  If covering different cases matters then they
should be explicitly handled.

In most places "any" is replaced by "$test_node".  In some cases,
where $test_node is not set, a fixed node that is already used
elsewhere can be reused.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Don't bother shutting down daemons in ctdb_init()
Martin Schwenke [Tue, 10 Dec 2019 03:47:23 +0000 (14:47 +1100)] 
ctdb-tests: Don't bother shutting down daemons in ctdb_init()

They'll never be up here...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Separate custom cluster startup from test initialisation
Martin Schwenke [Tue, 10 Dec 2019 03:44:45 +0000 (14:44 +1100)] 
ctdb-tests: Separate custom cluster startup from test initialisation

Separate cluster startup from test initialisation for tests that start
the cluster with customised configuration.  In these cases the result
of the cluster startup is actually the point of the test.
Additionally, pubips.013.failover_noop.sh claims to have completed
test initialisation twice, which just seems wrong.

The result is:

* ctdb_test_init() takes one option (-n) to indicate when it should
  not configure/start the cluster

* New function ctdb_nodes_start_custom() accepts options for special
  cluster configuration, only operates on local daemons and triggers a
  test failure rather than a test error on failure.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()
Martin Schwenke [Mon, 6 Jul 2020 01:56:16 +0000 (11:56 +1000)] 
ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()

The only caller calls ctdb_test_error() on failure and nesting this
calls can be confusing.  A future change will make this even more
confusing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Make unit.sh pass shellcheck
Martin Schwenke [Thu, 30 Apr 2020 04:35:12 +0000 (14:35 +1000)] 
ctdb-tests: Make unit.sh pass shellcheck

Mostly avoidance of quoting warnings.

Silencing warnings about unquoted $CTDB_TEST_CAT_RESULTS_OPTS is
handled by passing '-' to cat when that variable's value is empty.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Make integration.bash pass shellcheck
Martin Schwenke [Thu, 5 Mar 2020 18:58:26 +0000 (05:58 +1100)] 
ctdb-tests: Make integration.bash pass shellcheck

Apart from the non-constant sourcing of include files.

Mostly avoidance of quoting warnings.

One subtle change is to simply pass "120" to wait_until_ready() to
stop warnings that it expects arguments but none are passed (both
SC2119 and SC2120).  There seems no way to indicate to structure
function argument handling so that shellcheck realises arguments are
optional.  In later shellcheck versions, disabling SC2120 for a
function also silences complaints about its callers... but not all of
our testing uses "later" shellcheck versions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Use "#!/usr/bin/env bash" for improved portability
Martin Schwenke [Wed, 4 Mar 2020 02:55:07 +0000 (13:55 +1100)] 
ctdb-tests: Use "#!/usr/bin/env bash" for improved portability

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Update preamble for INTEGRATION tests
Martin Schwenke [Tue, 10 Dec 2019 03:50:42 +0000 (14:50 +1100)] 
ctdb-tests: Update preamble for INTEGRATION tests

* Use "#!/usr/bin/env bash" for improved portability

* Drop test_info() definition and replace it with a comment

  The use of test_info() is pointless.

* Drop call to cluster_is_healthy()

  This is a holdover from when the previous test would restart daemons
  to get things ready for a test.  There was also a bug where going
  into recovery during the restart would sometimes cause the cluster
  to become unhealthy.  If we really need something like this then we
  can add it to ctdb_test_init().

* Make order of preamble consistent

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Drop unreachable line
Martin Schwenke [Thu, 30 Apr 2020 04:14:43 +0000 (14:14 +1000)] 
ctdb-tests: Drop unreachable line

ctdb_test_skip() will exit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Redirect stderr too when checking for shellcheck
Martin Schwenke [Wed, 11 Mar 2020 05:33:27 +0000 (16:33 +1100)] 
ctdb-tests: Redirect stderr too when checking for shellcheck

Avoid:

  .../UNIT/shellcheck/scripts/local.sh: line 14: type: shellcheck: not found

The "type" command in dash prints the "not found" message to stdout
but the bash version prints to stderr, so redirect stderr too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Show hung script debugging output
Martin Schwenke [Tue, 21 Apr 2020 01:34:12 +0000 (11:34 +1000)] 
ctdb-tests: Show hung script debugging output

The output in a test failure appears to contain no pstree output
because "00\.test\.script,.*" does not match.  However, this is just a
guess because the output is not shown.

Showing the output makes it easier to understand test failures.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG
Martin Schwenke [Wed, 13 May 2020 04:04:36 +0000 (14:04 +1000)] 
ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG

This will allow local daemons to be used in more contexts, especially
in tests run by Jenkins where the directory names for some targets can
be very long.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-build: Don't build/install tests in top-level build by default
Martin Schwenke [Thu, 16 Feb 2017 08:23:44 +0000 (19:23 +1100)] 
ctdb-build: Don't build/install tests in top-level build by default

The standalone build still includes tests, as does the top-level build
when --enable-selftest is used.  The latter is consistent with the use
of --enable-selftest in the rest of the tree.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Stop cat command failure from causing test failure
Martin Schwenke [Mon, 6 Jul 2020 04:02:49 +0000 (14:02 +1000)] 
ctdb-tests: Stop cat command failure from causing test failure

In certain circumstance, which aren't obvious, cat(1) can fail when
attempting to write a lot of data.  This is due to something (probably
write(2)) returning EAGAIN.

Given that the -v option should only really be used for test
debugging, ignore the failure instead of spending time debugging it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14446
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-build: Don't build/install tests in top-level build by default"
Martin Schwenke [Wed, 22 Jul 2020 04:43:43 +0000 (14:43 +1000)] 
Revert "ctdb-build: Don't build/install tests in top-level build by default"

Fix missing Reviewed-by: tag.

This reverts commit 91c36c16c8516359380a00ee3d2229422b048d9f.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 22 06:29:43 UTC 2020 on sn-devel-184

5 years agoRevert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"
Martin Schwenke [Wed, 22 Jul 2020 04:43:40 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"

Fix missing Reviewed-by: tag.

This reverts commit 9694ba6fe4d073c653f49080127ee9efa21a8e9e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Show hung script debugging output"
Martin Schwenke [Wed, 22 Jul 2020 04:43:36 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Show hung script debugging output"

Fix missing Reviewed-by: tag.

This reverts commit c78de201f84f9fae9916af9592d42cbc71f805c5.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Redirect stderr too when checking for shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:31 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Redirect stderr too when checking for shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 847aa0e367c721944650aa34d67f8073461ae272.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Drop unreachable line"
Martin Schwenke [Wed, 22 Jul 2020 04:43:28 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Drop unreachable line"

Fix missing Reviewed-by: tag.

This reverts commit a55dd6f17b6d65db77bcd4f5a011e9aef64729e5.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Update preamble for INTEGRATION tests"
Martin Schwenke [Wed, 22 Jul 2020 04:43:24 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Update preamble for INTEGRATION tests"

Fix missing Reviewed-by: tag.

This reverts commit 65f56505e29c01d5891e5bc1050b6c37b8cbdee7.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"
Martin Schwenke [Wed, 22 Jul 2020 04:43:21 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"

Fix missing Reviewed-by: tag.

This reverts commit 9a7cabd342d0aed450ed3305931702a7351f814a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Make integration.bash pass shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:18 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Make integration.bash pass shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 0f04b8a70be3b8e157a4a88e9e54e87fa380022e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Make unit.sh pass shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:11 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Make unit.sh pass shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 30293baae5f22628405d327fc0b6bae993e96cd8.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"
Martin Schwenke [Wed, 22 Jul 2020 04:43:07 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"

Fix missing Reviewed-by: tag.

This reverts commit 44e05ac8515be3220a334ae8001db83b06bec59f.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Separate custom cluster startup from test initialisation"
Martin Schwenke [Wed, 22 Jul 2020 04:43:04 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Separate custom cluster startup from test initialisation"

Fix missing Reviewed-by: tag.

This reverts commit e9df17b500146e62539feac66d0cd4b3ef7aa47a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"
Martin Schwenke [Wed, 22 Jul 2020 04:43:01 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"

Fix missing Reviewed-by: tag.

This reverts commit 58f9f699f181ac217cda8de512b8385da173f884.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Drop uses of "onnode any ..." in testcases"
Martin Schwenke [Wed, 22 Jul 2020 04:42:57 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Drop uses of "onnode any ..." in testcases"

Fix missing Reviewed-by: tag.

This reverts commit aa5b214eaa88414c87410fd068fe7624e9790185.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability"
Martin Schwenke [Wed, 22 Jul 2020 04:42:53 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability"

Fix missing Reviewed-by: tag.

This reverts commit 1079d6e3ae5805ef65a3628edf0a3ac2cd7fac1c.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:49 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test quality"

Fix missing Reviewed-by: tag.

This reverts commit ea1cbff624383fb9d5b83b863fa6bd00a8fb77fa.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability"
Martin Schwenke [Wed, 22 Jul 2020 04:42:43 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability"

Fix missing Reviewed-by: tag.

This reverts commit 1f6556916e7f3a731d7d760fa6fd857e7f571541.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:36 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test quality"

Fix missing Reviewed-by: tag.

This reverts commit a308f2534d3991866efa2c662921ec63b4238888.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability/quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:11 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability/quality"

Fix missing Reviewed-by: tag.

This reverts commit d2f8cd835da39784f2d99231f9a1067ae56ede7a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Stop cat command failure from causing test failure"
Martin Schwenke [Wed, 22 Jul 2020 04:41:01 +0000 (14:41 +1000)] 
Revert "ctdb-tests: Stop cat command failure from causing test failure"

Fix missing Reviewed-by: tag.

This reverts commit 5707781ccf682d95a5a05a7c3e00a43003dbe62e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Stop cat command failure from causing test failure
Martin Schwenke [Mon, 6 Jul 2020 04:02:49 +0000 (14:02 +1000)] 
ctdb-tests: Stop cat command failure from causing test failure

In certain circumstance, which aren't obvious, cat(1) can fail when
attempting to write a lot of data.  This is due to something (probably
write(2)) returning EAGAIN.

Given that the -v option should only really be used for test
debugging, ignore the failure instead of spending time debugging it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14446
Signed-off-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul 22 04:10:47 UTC 2020 on sn-devel-184

5 years agoctdb-tests: Improve test portability/quality
Martin Schwenke [Thu, 5 Mar 2020 18:10:05 +0000 (05:10 +1100)] 
ctdb-tests: Improve test portability/quality

Avoid use of non-portable md5sum by constructing database names using
index.  Improve indentation, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 10:53:33 +0000 (21:53 +1100)] 
ctdb-tests: Improve test quality

Simplify code, use more modern commands, code improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 10:48:59 +0000 (21:48 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces, so
strip them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 09:42:01 +0000 (20:42 +1100)] 
ctdb-tests: Improve test quality

Select test node with IPs instead of using a fixed node.  Remove
unnecessary code, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 09:21:26 +0000 (20:21 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces and
stops "$num from being a number.  Create a more portable solution and
put it in a function instead of repeating the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Drop uses of "onnode any ..." in testcases
Martin Schwenke [Tue, 10 Dec 2019 00:33:02 +0000 (11:33 +1100)] 
ctdb-tests: Drop uses of "onnode any ..." in testcases

It would be nice to get rid of "onnode any".  There's no use making
tests nondeterministic.  If covering different cases matters then they
should be explicitly handled.

In most places "any" is replaced by "$test_node".  In some cases,
where $test_node is not set, a fixed node that is already used
elsewhere can be reused.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Don't bother shutting down daemons in ctdb_init()
Martin Schwenke [Tue, 10 Dec 2019 03:47:23 +0000 (14:47 +1100)] 
ctdb-tests: Don't bother shutting down daemons in ctdb_init()

They'll never be up here...

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Separate custom cluster startup from test initialisation
Martin Schwenke [Tue, 10 Dec 2019 03:44:45 +0000 (14:44 +1100)] 
ctdb-tests: Separate custom cluster startup from test initialisation

Separate cluster startup from test initialisation for tests that start
the cluster with customised configuration.  In these cases the result
of the cluster startup is actually the point of the test.
Additionally, pubips.013.failover_noop.sh claims to have completed
test initialisation twice, which just seems wrong.

The result is:

* ctdb_test_init() takes one option (-n) to indicate when it should
  not configure/start the cluster

* New function ctdb_nodes_start_custom() accepts options for special
  cluster configuration, only operates on local daemons and triggers a
  test failure rather than a test error on failure.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()
Martin Schwenke [Mon, 6 Jul 2020 01:56:16 +0000 (11:56 +1000)] 
ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()

The only caller calls ctdb_test_error() on failure and nesting this
calls can be confusing.  A future change will make this even more
confusing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Make unit.sh pass shellcheck
Martin Schwenke [Thu, 30 Apr 2020 04:35:12 +0000 (14:35 +1000)] 
ctdb-tests: Make unit.sh pass shellcheck

Mostly avoidance of quoting warnings.

Silencing warnings about unquoted $CTDB_TEST_CAT_RESULTS_OPTS is
handled by passing '-' to cat when that variable's value is empty.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Make integration.bash pass shellcheck
Martin Schwenke [Thu, 5 Mar 2020 18:58:26 +0000 (05:58 +1100)] 
ctdb-tests: Make integration.bash pass shellcheck

Apart from the non-constant sourcing of include files.

Mostly avoidance of quoting warnings.

One subtle change is to simply pass "120" to wait_until_ready() to
stop warnings that it expects arguments but none are passed (both
SC2119 and SC2120).  There seems no way to indicate to structure
function argument handling so that shellcheck realises arguments are
optional.  In later shellcheck versions, disabling SC2120 for a
function also silences complaints about its callers... but not all of
our testing uses "later" shellcheck versions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Use "#!/usr/bin/env bash" for improved portability
Martin Schwenke [Wed, 4 Mar 2020 02:55:07 +0000 (13:55 +1100)] 
ctdb-tests: Use "#!/usr/bin/env bash" for improved portability

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Update preamble for INTEGRATION tests
Martin Schwenke [Tue, 10 Dec 2019 03:50:42 +0000 (14:50 +1100)] 
ctdb-tests: Update preamble for INTEGRATION tests

* Use "#!/usr/bin/env bash" for improved portability

* Drop test_info() definition and replace it with a comment

  The use of test_info() is pointless.

* Drop call to cluster_is_healthy()

  This is a holdover from when the previous test would restart daemons
  to get things ready for a test.  There was also a bug where going
  into recovery during the restart would sometimes cause the cluster
  to become unhealthy.  If we really need something like this then we
  can add it to ctdb_test_init().

* Make order of preamble consistent

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Drop unreachable line
Martin Schwenke [Thu, 30 Apr 2020 04:14:43 +0000 (14:14 +1000)] 
ctdb-tests: Drop unreachable line

ctdb_test_skip() will exit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Redirect stderr too when checking for shellcheck
Martin Schwenke [Wed, 11 Mar 2020 05:33:27 +0000 (16:33 +1100)] 
ctdb-tests: Redirect stderr too when checking for shellcheck

Avoid:

  .../UNIT/shellcheck/scripts/local.sh: line 14: type: shellcheck: not found

The "type" command in dash prints the "not found" message to stdout
but the bash version prints to stderr, so redirect stderr too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Show hung script debugging output
Martin Schwenke [Tue, 21 Apr 2020 01:34:12 +0000 (11:34 +1000)] 
ctdb-tests: Show hung script debugging output

The output in a test failure appears to contain no pstree output
because "00\.test\.script,.*" does not match.  However, this is just a
guess because the output is not shown.

Showing the output makes it easier to understand test failures.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG
Martin Schwenke [Wed, 13 May 2020 04:04:36 +0000 (14:04 +1000)] 
ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG

This will allow local daemons to be used in more contexts, especially
in tests run by Jenkins where the directory names for some targets can
be very long.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-build: Don't build/install tests in top-level build by default
Martin Schwenke [Thu, 16 Feb 2017 08:23:44 +0000 (19:23 +1100)] 
ctdb-build: Don't build/install tests in top-level build by default

The standalone build still includes tests, as does the top-level build
when --enable-selftest is used.  The latter is consistent with the use
of --enable-selftest in the rest of the tree.

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agosmbd: build smb_fname per file to delete in unlink_internals()
Ralph Boehme [Fri, 19 Jun 2020 10:31:23 +0000 (12:31 +0200)] 
smbd: build smb_fname per file to delete in unlink_internals()

Make sure to pass fresh smb_fname's to do_unlink(). Needed for path-ref fsps in
the future.

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): Sat Jul 18 07:21:11 UTC 2020 on sn-devel-184

5 years agosmbd: consolidate fsp allocation for open_directory() and open_file_ntcreate()
Ralph Boehme [Fri, 19 Jun 2020 07:40:37 +0000 (09:40 +0200)] 
smbd: consolidate fsp allocation for open_directory() and open_file_ntcreate()

...at one place in the caller create_file_unixpath().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: factor out fsp_bind_smb()
Ralph Boehme [Fri, 19 Jun 2020 05:31:51 +0000 (07:31 +0200)] 
smbd: factor out fsp_bind_smb()

Needed for path-ref fsps in the future.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: don't mess with smb_dname->base_name in call_trans2findfirst()
Ralph Boehme [Thu, 18 Jun 2020 08:54:30 +0000 (10:54 +0200)] 
smbd: don't mess with smb_dname->base_name in call_trans2findfirst()

Create a fresh name instead. Needed to proper support for path-ref fsps in the
future.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/lib: fsp_str_dbg() doesn't show a possible stream name
Ralph Boehme [Tue, 23 Jun 2020 10:14:48 +0000 (12:14 +0200)] 
s3/lib: fsp_str_dbg() doesn't show a possible stream name

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: use helper variable for fd in fd_open()
Ralph Boehme [Wed, 15 Jul 2020 10:04:10 +0000 (12:04 +0200)] 
smbd: use helper variable for fd in fd_open()

No change in behaviour. Fwiw, no need to set fsp->fh->fd to -1 in the error case,
as that is initialized to -1 in fsp_new().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove errno saving from fd_open()
Ralph Boehme [Wed, 15 Jul 2020 10:01:18 +0000 (12:01 +0200)] 
smbd: remove errno saving from fd_open()

This is not needed anymore since 97d061237b0f2e07ae9c8e893734e222e58cfa4e.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove a nested block in non_widelink_open()
Ralph Boehme [Thu, 2 Jul 2020 06:02:45 +0000 (08:02 +0200)] 
smbd: remove a nested block in non_widelink_open()

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: use (global) POSIX pathname state in non_widelink_open()
Ralph Boehme [Thu, 2 Jul 2020 05:57:57 +0000 (07:57 +0200)] 
smbd: use (global) POSIX pathname state in non_widelink_open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: check for conn->cwd_fsp in fd_close()
Ralph Boehme [Sat, 13 Jun 2020 14:22:20 +0000 (16:22 +0200)] 
smbd: check for conn->cwd_fsp in fd_close()

This avoids doing the check in all callers.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: check for conn->cwd_fsp in file_free()
Ralph Boehme [Sat, 13 Jun 2020 14:21:22 +0000 (16:21 +0200)] 
smbd: check for conn->cwd_fsp in file_free()

This avoids doing the check in all callers.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: use a helper variable in open_file()
Ralph Boehme [Sun, 7 Jun 2020 14:42:50 +0000 (16:42 +0200)] 
smbd: use a helper variable in open_file()

No change in behaviour, this just prepares for changes to come.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: remove unused NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE
Ralph Boehme [Mon, 8 Jun 2020 07:29:01 +0000 (09:29 +0200)] 
smbd: remove unused NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE

The previous commit removed the only consumer of the flags.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: ensure we do a base open for internal stream deletes
Ralph Boehme [Mon, 8 Jun 2020 07:26:41 +0000 (09:26 +0200)] 
smbd: ensure we do a base open for internal stream deletes

Otherwise we're not opening the basefile so fsp->base_fsp remains NULL for fsp
handles on streams. As there are some places that use the check (fsp->base_fsp
!= NULL) to check for stream handles, eg streams_xattr_fstat(), we must ensure
it is set otherwise we open a pretty big window for undefined behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_posixacl: Remove unnecessary call to acl_set_permset
Christof Schmitt [Tue, 7 Jul 2020 05:27:59 +0000 (22:27 -0700)] 
vfs_posixacl: Remove unnecessary call to acl_set_permset

After the initial acl_get_permset, the permset is alreadying pointing to
the ACL entry and all changes are done on the ACL entry. There is no
need to overwrite the permissions in the ACL entry again with the same
value in the acl_set_permset call.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Jul 17 18:33:41 UTC 2020 on sn-devel-184

5 years agotest_vfs_posixacl: Add unit test for Linux POSIX ACL mapping
Christof Schmitt [Wed, 8 Jul 2020 03:02:42 +0000 (20:02 -0700)] 
test_vfs_posixacl: Add unit test for Linux POSIX ACL mapping

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agopam_winbind: Fix CID 242274 Time of check time of use
Christof Schmitt [Thu, 9 Jul 2020 03:03:44 +0000 (20:03 -0700)] 
pam_winbind: Fix CID 242274 Time of check time of use

Always issue the mkdir call to avoid the TOCTOU issue. Only if there is
already an object with the requested name, check whether it is a
directory.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agodocs: Fix documentation for require_membership_of of pam_winbind.conf
Andreas Schneider [Fri, 17 Jul 2020 10:14:16 +0000 (12:14 +0200)] 
docs: Fix documentation for require_membership_of of pam_winbind.conf

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14358

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 17 13:07:44 UTC 2020 on sn-devel-184

5 years agopython: samba.compat rejects Python 2
Douglas Bagnall [Sat, 4 Jul 2020 01:30:28 +0000 (13:30 +1200)] 
python: samba.compat rejects Python 2

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jul 17 08:39:38 UTC 2020 on sn-devel-184

5 years agopython: wrap 'import dckeytab' in an explanatory function
Douglas Bagnall [Sat, 4 Jul 2020 04:20:47 +0000 (16:20 +1200)] 
python: wrap 'import dckeytab' in an explanatory function

The samba.dckeytab module has magic effects on samba.net, but never
appears to be used. That can be confusing, both to people and to
linters. Here we wrap that confusion up into a well-commented
function, so we never again have to wonder why the unused import is
there.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agopython/join: use the provided krbtgt link in cleanup_old_accounts
Douglas Bagnall [Thu, 11 Oct 2018 00:08:38 +0000 (13:08 +1300)] 
python/join: use the provided krbtgt link in cleanup_old_accounts

Before we were putting it in an otherwise unused variable, and
deleting the previous krbtgt_dn, if any.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agopython/upgradehelpers: remove unused imports and variables
Douglas Bagnall [Thu, 11 Oct 2018 00:14:02 +0000 (13:14 +1300)] 
python/upgradehelpers: remove unused imports and variables

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agosamba-tool ntacl: remove unused imports and variables
Douglas Bagnall [Wed, 10 Oct 2018 23:40:50 +0000 (12:40 +1300)] 
samba-tool ntacl: remove unused imports and variables

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agos4/scripting/samba_dnsupdate: remove unreachable code
Douglas Bagnall [Thu, 11 Oct 2018 09:54:32 +0000 (22:54 +1300)] 
s4/scripting/samba_dnsupdate: remove unreachable code

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agopython/ms_forest_updates_markdown: avoid implicit global variable
Douglas Bagnall [Sat, 27 Oct 2018 21:37:51 +0000 (10:37 +1300)] 
python/ms_forest_updates_markdown: avoid implicit global variable

out_dict would have been shared across all calls, aggregating values as it went.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agodbcheck: omit unused argument in err_wrong_default_sd
Douglas Bagnall [Wed, 31 Oct 2018 20:46:46 +0000 (09:46 +1300)] 
dbcheck: omit unused argument in err_wrong_default_sd

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
5 years agos4/torture: fix compilation in smb2/multichannel
Douglas Bagnall [Tue, 14 Jul 2020 10:49:51 +0000 (22:49 +1200)] 
s4/torture: fix compilation in smb2/multichannel

GCC 9.3.0 doesn't like a true array being compared to NULL.

[3628/3972] Compiling source4/torture/smb2/multichannel.c
../../source4/torture/smb2/multichannel.c:1077:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
                if (trees2 == NULL || trees2[i] == NULL) {
                    ^~~~~~    ~~~~
../../source4/torture/smb2/multichannel.c:1284:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
                if (trees2 == NULL || trees2[i] == NULL) {
                    ^~~~~~    ~~~~
../../source4/torture/smb2/multichannel.c:2337:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare]
                if (trees2 == NULL || trees2[i] == NULL) {
                    ^~~~~~    ~~~~
3 errors generated.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul 17 07:16:31 UTC 2020 on sn-devel-184

5 years agos4/torture/smb2/oplock: fix compilation by initialising variable
Douglas Bagnall [Tue, 14 Jul 2020 10:31:02 +0000 (22:31 +1200)] 
s4/torture/smb2/oplock: fix compilation by initialising variable

With gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0:

../../source4/torture/smb2/oplock.c:2709:2: error: variable 'h2' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "Incorrect status");
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../lib/torture/torture.h:734:3: note: expanded from macro 'torture_assert_ntstatus_ok_goto'
                torture_assert_ntstatus_equal_goto(torture_ctx,expr,NT_STATUS_OK,ret,label,cmt)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../lib/torture/torture.h:302:6: note: expanded from macro 'torture_assert_ntstatus_equal_goto'
        if (!NT_STATUS_EQUAL(__got, __expected)) { \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../source4/torture/smb2/oplock.c:2730:25: note: uninitialized use occurs here
        smb2_util_close(tree1, h2);
                               ^~
../../source4/torture/smb2/oplock.c:2709:2: note: remove the 'if' if its condition is always false
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "Incorrect status");
        ^
../../lib/torture/torture.h:734:3: note: expanded from macro 'torture_assert_ntstatus_ok_goto'
                torture_assert_ntstatus_equal_goto(torture_ctx,expr,NT_STATUS_OK,ret,label,cmt)
                ^
../../lib/torture/torture.h:302:2: note: expanded from macro 'torture_assert_ntstatus_equal_goto'
        if (!NT_STATUS_EQUAL(__got, __expected)) { \
        ^
../../source4/torture/smb2/oplock.c:2652:2: note: variable 'h2' is declared here
        struct smb2_handle h, h1, h2;
        ^
1 error generated.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: libsmb: Namecache. Fix bug missed by me in previous cleanup.
Jeremy Allison [Thu, 16 Jul 2020 22:47:04 +0000 (15:47 -0700)] 
s3: libsmb: Namecache. Fix bug missed by me in previous cleanup.

In ipstr_list_make() we need to look at the correct array entry
to determine the ss_family for the sockaddr_storage.

Otherwise we are always storing the type of the first entry.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 17 05:54:31 UTC 2020 on sn-devel-184

5 years agos3-libads: Pass timeout to open_socket_out in ms
Isaac Boukris [Tue, 14 Jul 2020 20:38:06 +0000 (22:38 +0200)] 
s3-libads: Pass timeout to open_socket_out in ms

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13124

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 16 10:41:40 UTC 2020 on sn-devel-184

5 years agos3: libsmb: Cleanup - Make ipstr_list_make() talloc rather than malloc.
Jeremy Allison [Wed, 15 Jul 2020 22:02:02 +0000 (15:02 -0700)] 
s3: libsmb: Cleanup - Make ipstr_list_make() talloc rather than malloc.

Remove the excessive and unneeded ipstr_list_add() function,
fold it into ipstr_list_make() to make it much clearer what
we're doing.

The only use of MALLOC now is in ipstr_list_parse() returned
by namecache_fetch(). We need to fix the caller before
we can move that to talloc. As that is used inside internal_resolve_name()
which is designed to return a MALLOC'ed ip list from all
name resolution mechanisms leave that fix for another day.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jul 16 08:16:31 UTC 2020 on sn-devel-184

5 years agos3: libsmb: Cleanup - Move DEBUG -> DBG_XXX() macros.
Jeremy Allison [Wed, 15 Jul 2020 21:41:45 +0000 (14:41 -0700)] 
s3: libsmb: Cleanup - Move DEBUG -> DBG_XXX() macros.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup - make namecache_status_record_key() use talloc.
Jeremy Allison [Wed, 15 Jul 2020 21:38:23 +0000 (14:38 -0700)] 
s3: libsmb: Cleanup - make namecache_status_record_key() use talloc.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup - make namecache_key() use talloc.
Jeremy Allison [Wed, 15 Jul 2020 20:37:59 +0000 (13:37 -0700)] 
s3: libsmb: Cleanup - make namecache_key() use talloc.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup - namecache_store() - use common out.
Jeremy Allison [Wed, 15 Jul 2020 20:33:27 +0000 (13:33 -0700)] 
s3: libsmb: Cleanup - namecache_store() - use common out.

Prepare for moving malloc values to talloc.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup - namecache_store() initialize stack variables.
Jeremy Allison [Wed, 15 Jul 2020 20:31:38 +0000 (13:31 -0700)] 
s3: libsmb: Cleanup - namecache_store() initialize stack variables.

Preparing for common out: exit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup - move talloc frame out of inner scope.
Jeremy Allison [Wed, 15 Jul 2020 20:28:33 +0000 (13:28 -0700)] 
s3: libsmb: Cleanup - move talloc frame out of inner scope.

Make it available thoughout the function. Prepare to use
talloc for namecache_key().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: libsmb: Cleanup modern coding standards. 'True/False' -> 'true/false'.
Jeremy Allison [Wed, 15 Jul 2020 19:12:23 +0000 (12:12 -0700)] 
s3: libsmb: Cleanup modern coding standards. 'True/False' -> 'true/false'.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: lib: Cleanup - make ipstr_list_make() and ipstr_list_parse() private to the only...
Jeremy Allison [Wed, 15 Jul 2020 18:58:45 +0000 (11:58 -0700)] 
s3: lib: Cleanup - make ipstr_list_make() and ipstr_list_parse() private to the only user.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: lib: Cleanup - nothing uses ipstr_list_free(). Remove it.
Jeremy Allison [Wed, 15 Jul 2020 18:48:30 +0000 (11:48 -0700)] 
s3: lib: Cleanup - nothing uses ipstr_list_free(). Remove it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: lib: Cleanup - all the ipstr_XXX() functions are only used in namecache.c.
Jeremy Allison [Wed, 15 Jul 2020 18:43:03 +0000 (11:43 -0700)] 
s3: lib: Cleanup - all the ipstr_XXX() functions are only used in namecache.c.

Move them there. Will remove from the global namespace next.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoctdb-tools: Improve onnode's ShellCheck credibility
Martin Schwenke [Wed, 3 Jun 2020 23:59:59 +0000 (09:59 +1000)] 
ctdb-tools: Improve onnode's ShellCheck credibility

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 Jul 16 06:51:47 UTC 2020 on sn-devel-184