]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agolibcli/ldap: Fix CID 1462695 Resource leak
Volker Lendecke [Wed, 5 Aug 2020 09:25:27 +0000 (11:25 +0200)] 
libcli/ldap: Fix CID 1462695 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/ldap: Fix CID 1462696 Resource leak
Volker Lendecke [Wed, 5 Aug 2020 09:23:30 +0000 (11:23 +0200)] 
libcli/ldap: Fix CID 1462696 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/ldap: Fix CID 1465278 Resource leak
Volker Lendecke [Wed, 5 Aug 2020 09:18:35 +0000 (11:18 +0200)] 
libcli/ldap: Fix CID 1465278 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agogpo: Remove unused gp_ext_setter code
David Mulder [Wed, 8 Jul 2020 20:50:27 +0000 (14:50 -0600)] 
gpo: Remove unused gp_ext_setter code

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): David Mulder <dmulder@samba.org>
Autobuild-Date(master): Thu Aug  6 18:01:49 UTC 2020 on sn-devel-184

5 years agogpo: Extract Access policy from Security extension
David Mulder [Wed, 8 Jul 2020 20:48:45 +0000 (14:48 -0600)] 
gpo: Extract Access policy from Security extension

Rewrite the extension to be easier to understand,
and to remove references to gp_ext_setter.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Extract Kerberos policy from Security extension
David Mulder [Fri, 26 Jun 2020 21:34:02 +0000 (15:34 -0600)] 
gpo: Extract Kerberos policy from Security extension

Rewrite the extension to be easier to understand,
and to remove references to gp_ext_setter.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Add RSOP output for Scripts Extension
David Mulder [Mon, 6 Jul 2020 17:16:45 +0000 (11:16 -0600)] 
gpo: Add RSOP output for Scripts Extension

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Add RSOP output for Security Extension
David Mulder [Mon, 6 Jul 2020 17:16:14 +0000 (11:16 -0600)] 
gpo: Add RSOP output for Security Extension

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test samba-gpupdate --rsop
David Mulder [Tue, 7 Jul 2020 16:35:25 +0000 (10:35 -0600)] 
gpo: Test samba-gpupdate --rsop

Test that the rsop command produces the expected
output.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Add --rsop option to samba-gpupdate
David Mulder [Mon, 6 Jul 2020 14:25:23 +0000 (08:25 -0600)] 
gpo: Add --rsop option to samba-gpupdate

This command prints the Resultant Set of Policy
for applicable GPOs, for either the Computer or
User policy (depending on the target specified).
Policy specific output must be implemented for
each client side extension.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Properly decode utf-8/16 inf files from bytes
David Mulder [Mon, 6 Jul 2020 14:13:57 +0000 (08:13 -0600)] 
gpo: Properly decode utf-8/16 inf files from bytes

This code was python 2 specific (string handling
has changed dramatically in python 3), and didn't
correctly decode utf-16 in python3. We should
instead read the file as bytes, then attempt a
utf-8 decode (the default), and try utf-16 if
encountering a decode failure.
The existing code actually throws an exception on
the initial file read when the data is utf-16,
since it tries to decode the bytes to a utf-8
string.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test proper decoding of utf-16 inf files
David Mulder [Tue, 7 Jul 2020 17:10:10 +0000 (11:10 -0600)] 
gpo: Test proper decoding of utf-16 inf files

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Apply Group Policy Sudo Rights
David Mulder [Fri, 26 Jun 2020 18:35:20 +0000 (12:35 -0600)] 
gpo: Apply Group Policy Sudo Rights

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test Group Policy Sudo Rights
David Mulder [Fri, 26 Jun 2020 18:37:11 +0000 (12:37 -0600)] 
gpo: Test Group Policy Sudo Rights

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Scripts gpo add warning about generated scripts
David Mulder [Thu, 2 Jul 2020 16:13:15 +0000 (10:13 -0600)] 
gpo: Scripts gpo add warning about generated scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Scripts extension use 'gp_' prefix, not 'tmp'
David Mulder [Thu, 2 Jul 2020 16:04:36 +0000 (10:04 -0600)] 
gpo: Scripts extension use 'gp_' prefix, not 'tmp'

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Move all scripts to a sub-category in samba.admx
David Mulder [Fri, 26 Jun 2020 19:10:43 +0000 (13:10 -0600)] 
gpo: Move all scripts to a sub-category in samba.admx

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Apply Group Policy Weekly Scripts
David Mulder [Thu, 25 Jun 2020 21:23:14 +0000 (15:23 -0600)] 
gpo: Apply Group Policy Weekly Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test gpo weekly scripts apply
David Mulder [Thu, 25 Jun 2020 21:23:35 +0000 (15:23 -0600)] 
gpo: Test gpo weekly scripts apply

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Apply Group Policy Monthly Scripts
David Mulder [Thu, 25 Jun 2020 21:02:37 +0000 (15:02 -0600)] 
gpo: Apply Group Policy Monthly Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test gpo monthly scripts apply
David Mulder [Thu, 25 Jun 2020 21:03:03 +0000 (15:03 -0600)] 
gpo: Test gpo monthly scripts apply

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Apply Group Policy Hourly Scripts
David Mulder [Thu, 25 Jun 2020 20:14:09 +0000 (14:14 -0600)] 
gpo: Apply Group Policy Hourly Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agogpo: Test gpo hourly scripts apply
David Mulder [Thu, 25 Jun 2020 20:15:18 +0000 (14:15 -0600)] 
gpo: Test gpo hourly scripts apply

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agolib: fix smb_strtox.[c|h] license header
Ralph Boehme [Wed, 5 Aug 2020 08:11:29 +0000 (10:11 +0200)] 
lib: fix smb_strtox.[c|h] license header

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug  5 10:17:06 UTC 2020 on sn-devel-184

5 years agos3: libsmb: Move all calls to convert_ss2service() to one place now all methods retur...
Jeremy Allison [Tue, 21 Jul 2020 03:52:58 +0000 (20:52 -0700)] 
s3: libsmb: Move all calls to convert_ss2service() to one place now all methods return a sockaddr_storage.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Isaac Boukris <iboukris@samba.org>
Autobuild-Date(master): Tue Aug  4 10:13:53 UTC 2020 on sn-devel-184

5 years agos3: libsmb: Now all resolution functions return a ss_list on success, we only need...
Jeremy Allison [Tue, 21 Jul 2020 03:40:02 +0000 (20:40 -0700)] 
s3: libsmb: Now all resolution functions return a ss_list on success, we only need one local variable for this.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Change resolve_ads() to return a talloc'ed ss_list, matching the other...
Jeremy Allison [Tue, 21 Jul 2020 03:17:54 +0000 (20:17 -0700)] 
s3: libsmb: Change resolve_ads() to return a talloc'ed ss_list, matching the other name resolution methods.

Now we can move all the convert_ss2service() calls to one place.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Rewrite resolve_ads() to use the previously added dns_lookup_list() function.
Jeremy Allison [Tue, 21 Jul 2020 02:50:04 +0000 (19:50 -0700)] 
s3: libsmb: Rewrite resolve_ads() to use the previously added dns_lookup_list() function.

Clean up internals - a LOT.

This one needs careful review. Ditch the (unused) port returns from
the SRV replies.

Internally uses talloc'ed arrays of struct sockaddr_storage
which it then convert to MALLOC'ed struct ip_service.

Still returns struct ip_service but this will be
fixed in the next commit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Add in (currently unused) function dns_lookup_list().
Jeremy Allison [Tue, 21 Jul 2020 01:31:16 +0000 (18:31 -0700)] 
s3: libsmb: Add in (currently unused) function dns_lookup_list().

This function takes a list of names returned from a DNS SRV
query which didn't have returned IP addresses and returns an
array of struct sockaddr_storage.

Currently synchronous, but this is the function that will
be changed to be asynchronous later.

Compiles but commented out for now so we don't get "unused
function" warnings.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Pass in TALLOC_CTX * parameter to resolve_ads() instead of creating one...
Jeremy Allison [Tue, 21 Jul 2020 00:59:20 +0000 (17:59 -0700)] 
s3: libsmb: Pass in TALLOC_CTX * parameter to resolve_ads() instead of creating one internally.

Pass in talloc_tos() to make it match the other resolve_XXX() functions.

No memory leaks as this is used for transient data and is cleaned up
when the calling frame in internal_resolve_name() is destroyed.

Preparing to have it return a talloc'ed struct sockaddr_storage array
rather than a malloc'ed struct ip_service array.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - ensure ss_list variables are initialized with NULL.
Jeremy Allison [Tue, 21 Jul 2020 03:27:38 +0000 (20:27 -0700)] 
s3: libsmb: Cleanup - ensure ss_list variables are initialized with NULL.

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().
Jeremy Allison [Tue, 21 Jul 2020 00:56:48 +0000 (17:56 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in resolve_wins().
Jeremy Allison [Tue, 21 Jul 2020 00:53:28 +0000 (17:53 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in resolve_wins().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in resolve_lmhosts_file_as_so...
Jeremy Allison [Tue, 21 Jul 2020 00:50:21 +0000 (17:50 -0700)] 
s3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in resolve_lmhosts_file_as_sockaddr() to match modern conventions.

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in resolve_hosts().
Jeremy Allison [Tue, 21 Jul 2020 00:45:44 +0000 (17:45 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in resolve_hosts().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting name_resolve_bcast() parameters inside internal_re...
Jeremy Allison [Tue, 21 Jul 2020 00:44:03 +0000 (17:44 -0700)] 
s3: libsmb: Cleanup - reformatting name_resolve_bcast() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_wins() parameters inside internal_resolve_...
Jeremy Allison [Tue, 21 Jul 2020 00:43:26 +0000 (17:43 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_wins() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_lmhosts_file_as_sockaddr() parameters...
Jeremy Allison [Tue, 21 Jul 2020 00:42:44 +0000 (17:42 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_lmhosts_file_as_sockaddr() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting 2nd use of resolve_ads() parameters inside interna...
Jeremy Allison [Tue, 21 Jul 2020 00:40:06 +0000 (17:40 -0700)] 
s3: libsmb: Cleanup - reformatting 2nd use of resolve_ads() parameters inside internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_ads() parameters inside internal_resolve_n...
Jeremy Allison [Tue, 21 Jul 2020 00:39:33 +0000 (17:39 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_ads() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_hosts() parameters inside internal_resolve...
Jeremy Allison [Tue, 21 Jul 2020 00:38:20 +0000 (17:38 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_hosts() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - Remove incorrect comment in resolve_ads(). The DNS code copes...
Jeremy Allison [Tue, 21 Jul 2020 00:35:22 +0000 (17:35 -0700)] 
s3: libsmb: Cleanup - Remove incorrect comment in resolve_ads(). The DNS code copes fine with IPv6 addresses.

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - modernize DEBUG -> DBG_ in internal_resolve_name()
Jeremy Allison [Tue, 21 Jul 2020 00:32:47 +0000 (17:32 -0700)] 
s3: libsmb: Cleanup - modernize DEBUG -> DBG_ in internal_resolve_name()

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - split allocation and NULL check in internal_resolve_name().
Jeremy Allison [Tue, 21 Jul 2020 00:28:41 +0000 (17:28 -0700)] 
s3: libsmb: Cleanup - split allocation and NULL check in internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for internal_resolve_name().
Jeremy Allison [Tue, 21 Jul 2020 00:27:13 +0000 (17:27 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for name_resolve_bcast().
Jeremy Allison [Tue, 21 Jul 2020 00:05:27 +0000 (17:05 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for name_resolve_bcast().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_wins().
Jeremy Allison [Tue, 21 Jul 2020 00:04:57 +0000 (17:04 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_lmhosts_file_as_sockaddr().
Jeremy Allison [Tue, 21 Jul 2020 00:03:21 +0000 (17:03 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_lmhosts_file_as_sockaddr().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts().
Jeremy Allison [Tue, 21 Jul 2020 00:02:15 +0000 (17:02 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for name_re...
Jeremy Allison [Tue, 21 Jul 2020 00:01:04 +0000 (17:01 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for name_resolve_bcast().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Tue, 21 Jul 2020 00:00:35 +0000 (17:00 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for 0x1D...
Jeremy Allison [Mon, 20 Jul 2020 23:59:38 +0000 (16:59 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for 0x1D name in resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:58:46 +0000 (16:58 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_lmhosts_file_as_sockaddr().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:57:43 +0000 (16:57 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_ads().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC...
Jeremy Allison [Mon, 20 Jul 2020 23:56:14 +0000 (16:56 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC resolve_ads().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:54:45 +0000 (16:54 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_hosts().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - ensure we don't try and continue resolving names on failure...
Jeremy Allison [Tue, 21 Jul 2020 03:57:44 +0000 (20:57 -0700)] 
s3: libsmb: Cleanup - ensure we don't try and continue resolving names on failure of convert_ss2service().

Logic change, but correct error cleanup - jump to new 'fail:' label.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: scripts: Selfttest. samba3.blackbox.smbclient_iconv.*
Jeremy Allison [Mon, 3 Aug 2020 22:06:03 +0000 (15:06 -0700)] 
s3: scripts: Selfttest. samba3.blackbox.smbclient_iconv.*

Fix missing 'include' in temporary client smb.conf file.

The current temporary generated smb.conf file for the client, "client_cp850_smbconf"
doesn't include the normal client smb.conf file "client.conf".

This means it's missing the:

interfaces = XXXX,YYYY

line we needed to find the server via socketwrapper. Currently this test is finding the server by accident :-).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  4 06:30:25 UTC 2020 on sn-devel-184

5 years agolib: relicense smb_strtoul(l) under LGPLv3
Ralph Boehme [Fri, 3 Jul 2020 06:11:20 +0000 (08:11 +0200)] 
lib: relicense smb_strtoul(l) under LGPLv3

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug  3 22:21:04 UTC 2020 on sn-devel-184

5 years agoldap_server: fix hurd build
Samuel Thibault [Sun, 2 Aug 2020 18:06:08 +0000 (18:06 +0000)] 
ldap_server: fix hurd build

There is no hardcoded IOV_MAX iov limitation on GNU/Hurd. We however do
not want unbound allocation, so define it to a reasonable amount.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug  3 09:39:02 UTC 2020 on sn-devel-184

5 years agoREADME.Coding: target Python 3.6+
Douglas Bagnall [Wed, 29 Jul 2020 03:35:12 +0000 (15:35 +1200)] 
README.Coding: target Python 3.6+

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug  3 04:13:37 UTC 2020 on sn-devel-184

5 years agopython tests: drop python 2.6 compatibility functions
Douglas Bagnall [Sat, 4 Jul 2020 02:28:40 +0000 (14:28 +1200)] 
python tests: drop python 2.6 compatibility functions

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agondr: avoid excessive reallocing in pull_string_array
Douglas Bagnall [Thu, 30 Jul 2020 00:06:10 +0000 (12:06 +1200)] 
ndr: avoid excessive reallocing in pull_string_array

Before, talloc_realloc() was being called n times for an array of
length n. This could be very expensive on long string arrays since it
is reasonable to assume each realloc moves O(n) bytes.

This addresses at least one OSS-Fuzz bug, making a timing out test case
100 times faster. Credit to OSS-Fuzz.

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19706

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agondr: maintain proper talloc tree in pull_string_array
Douglas Bagnall [Wed, 29 Jul 2020 22:46:17 +0000 (10:46 +1200)] 
ndr: maintain proper talloc tree in pull_string_array

We don't want to leave other parts of the ndr struct hanging off this
string array just because LIBNDR_FLAG_REMAINING is used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agooss-fuzz: use uninstrumented dynamic python
Douglas Bagnall [Fri, 31 Jul 2020 03:36:16 +0000 (15:36 +1200)] 
oss-fuzz: use uninstrumented dynamic python

We can't link to the instrumented statically built Python, so instead
we use the system Python in the docker image.

REF: https://github.com/google/oss-fuzz/issues/4223
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22618
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14451

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosmbd: remove get_current_vuid()
Ralph Boehme [Wed, 29 Jul 2020 12:17:52 +0000 (14:17 +0200)] 
smbd: remove get_current_vuid()

The last user was removed by 3d09993725412bb0e856cc2ebf6ac68f8e762730.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jul 29 13:44:47 UTC 2020 on sn-devel-184

5 years agoldb_controls: control_to_string avoids crash
Douglas Bagnall [Fri, 24 Jul 2020 00:41:29 +0000 (12:41 +1200)] 
ldb_controls: control_to_string avoids crash

Otherwise a malformed control with unexpected NULL data will segfault
ldb_control_to_string(), though this is not very likely to affect
anyone in practice as converting controls to strings is rarely
necessary. If it happens at all in Samba it is in Python code.

Found by Honggfuzz using fuzz_ldb_parse_control.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jul 29 04:43:23 UTC 2020 on sn-devel-184

5 years agodbcheck: Allow a dangling forward link outside our known NCs
Andrew Bartlett [Sun, 26 Jul 2020 23:37:29 +0000 (11:37 +1200)] 
dbcheck: Allow a dangling forward link outside our known NCs

If we do not have the NC of the target object we can not be really sure
that the object is redundent and so we want to keep it for now
and not (as happened until now) break the dbcheck run made during the
replication stage of a "samba-tool domain backup rename".

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agokdc:db-glue: ignore KRB5_PROG_ETYPE_NOSUPP also for Primary:Kerberos
Stefan Metzmacher [Thu, 23 Apr 2020 09:56:54 +0000 (11:56 +0200)] 
kdc:db-glue: ignore KRB5_PROG_ETYPE_NOSUPP also for Primary:Kerberos

Currently we only ignore KRB5_PROG_ETYPE_NOSUPP for
Primary:Kerberos-Newer-Keys, but not for Primary:Kerberos.

If a service account has msDS-SupportedEncryptionTypes: 31
and DES keys stored in Primary:Kerberos, we'll pass the
DES key to smb_krb5_keyblock_init_contents(), but may get
KRB5_PROG_ETYPE_NOSUPP.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 28 14:04:26 UTC 2020 on sn-devel-184

5 years agoAdd a test with old msDS-SupportedEncryptionTypes
Isaac Boukris [Mon, 27 Apr 2020 12:00:38 +0000 (14:00 +0200)] 
Add a test with old msDS-SupportedEncryptionTypes

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

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agonsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
Khem Raj [Thu, 23 Jul 2020 05:42:09 +0000 (22:42 -0700)] 
nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h

glibc 2.32 will define these varibles [1] which results in conflicts
with these static function names, therefore prefix these function names
with samba_ to avoid it

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jul 28 10:52:00 UTC 2020 on sn-devel-184

5 years agoctdb-scripts: Use nfsconf as a last resort get nfsd thread count
Martin Schwenke [Mon, 20 Jul 2020 02:02:45 +0000 (12:02 +1000)] 
ctdb-scripts: Use nfsconf as a last resort get nfsd thread count

If nfsconf exists then use it as last resort to attempt to extract
[nfsd]:threads from /etc/nfs.conf.

Invocation of nfsconf requires "|| true" because this script uses "set
-e".  Add a stub that always fails to at least test this much.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14444
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): Mon Jul 27 07:06:58 UTC 2020 on sn-devel-184

5 years agoctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME
Martin Schwenke [Mon, 13 Jul 2020 00:16:33 +0000 (10:16 +1000)] 
ctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME

If nfsconf exists then use it as last resort to attempt to extract
[statd]:name from /etc/nfs.conf.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14444
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoWHATSNEW: Fix description of CTDB NAT gateway and LVS changes
Martin Schwenke [Sat, 25 Jul 2020 20:50:22 +0000 (06:50 +1000)] 
WHATSNEW: Fix description of CTDB NAT gateway and LVS changes

Oops!  Using parentheses makes it harder to get this wrong.

Reported-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Jul 26 13:01:09 UTC 2020 on sn-devel-184

5 years agoWHATSNEW: Document CTDB NAT gateway and LVS changes
Martin Schwenke [Fri, 17 Jul 2020 10:38:12 +0000 (20:38 +1000)] 
WHATSNEW: Document CTDB NAT gateway and LVS changes

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): Fri Jul 24 09:58:53 UTC 2020 on sn-devel-184

5 years agoctdb: Change LVS to use leader/follower
Martin Schwenke [Fri, 17 Jul 2020 10:46:07 +0000 (20:46 +1000)] 
ctdb: Change LVS to use leader/follower

Instead of master/slave.

Nearly all of these are simple textual substitutions, which preserve
the case of the original.    A couple of minor cleanups were made in the
documentation (such as "LVSMASTER" -> "LVS leader").

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb: Change NAT gateway to use leader/follower
Martin Schwenke [Wed, 24 Jun 2020 01:20:24 +0000 (11:20 +1000)] 
ctdb: Change NAT gateway to use leader/follower

Instead of master/slave.

Nearly all of these are simple textual substitutions, which preserve
the case of the original.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Simplify calculation of new flags
Martin Schwenke [Tue, 14 Jul 2020 04:29:09 +0000 (14:29 +1000)] 
ctdb-recoverd: Simplify calculation of new flags

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): Fri Jul 24 06:03:23 UTC 2020 on sn-devel-184

5 years agoctdb-recoverd: Correctly find nodemap entry for pnn
Martin Schwenke [Tue, 14 Jul 2020 04:22:15 +0000 (14:22 +1000)] 
ctdb-recoverd: Correctly find nodemap entry for pnn

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Do not retrieve nodemap from recovery master
Martin Schwenke [Tue, 5 May 2020 13:49:05 +0000 (23:49 +1000)] 
ctdb-recoverd: Do not retrieve nodemap from recovery master

It is already in rec->nodemap.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Flatten update_flags_on_all_nodes()
Martin Schwenke [Fri, 28 Sep 2018 00:46:17 +0000 (10:46 +1000)] 
ctdb-recoverd: Flatten update_flags_on_all_nodes()

The logic currently in ctdb_ctrl_modflags() will be optimised so that
it no longer matches the pattern for a control function.  So, remove
this function and squash its functionality into the only caller.

Although there are some superficial changes, the behaviour is
unchanged.

Flattening the 2 functions produces some seriously weird logic for
setting the new flags, to the point where using ctdb_ctrl_modflags()
for this purpose now looks very strange.  The weirdness will be
cleaned up in a subsequent commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Move ctdb_ctrl_modflags() to ctdb_recoverd.c
Martin Schwenke [Tue, 5 May 2020 13:37:57 +0000 (23:37 +1000)] 
ctdb-recoverd: Move ctdb_ctrl_modflags() to ctdb_recoverd.c

This file is the only user of this function.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Improve a call to update_flags_on_all_nodes()
Martin Schwenke [Tue, 14 Jul 2020 04:43:04 +0000 (14:43 +1000)] 
ctdb-recoverd: Improve a call to update_flags_on_all_nodes()

This should take a PNN, not an array index.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Use update_flags_on_all_nodes()
Martin Schwenke [Fri, 14 Jun 2019 21:20:19 +0000 (07:20 +1000)] 
ctdb-recoverd: Use update_flags_on_all_nodes()

This is clearer than using the MODFLAGS control directly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Introduce some local variables to improve readability
Martin Schwenke [Fri, 14 Jun 2019 21:19:26 +0000 (07:19 +1000)] 
ctdb-recoverd: Introduce some local variables to improve readability

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Change update_flags_on_all_nodes() to take rec argument
Martin Schwenke [Tue, 5 May 2020 13:45:15 +0000 (23:45 +1000)] 
ctdb-recoverd: Change update_flags_on_all_nodes() to take rec argument

This makes fields such as recmaster and nodemap easily available if
required.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
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>