samba.git
2 years agoldb: bump version to 2.6.0 for Samba 4.17.x releases ldb-2.6.0
Stefan Metzmacher [Mon, 24 Jan 2022 10:57:15 +0000 (11:57 +0100)]
ldb: bump version to 2.6.0 for Samba 4.17.x releases

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jule Anger <janger@samba.org>
Autobuild-User(master): Jule Anger <janger@samba.org>
Autobuild-Date(master): Mon Jan 24 12:15:09 UTC 2022 on sn-devel-184

2 years agoVERSION: Bump version up to 4.17.0pre1...
Jule Anger [Mon, 24 Jan 2022 10:51:04 +0000 (11:51 +0100)]
VERSION: Bump version up to 4.17.0pre1...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoVERSION: Disable GIT_SNAPSHOT for the Samba 4.16.0rc1 release. samba-4.16.0rc1
Jule Anger [Mon, 24 Jan 2022 10:46:26 +0000 (11:46 +0100)]
VERSION: Disable GIT_SNAPSHOT for the Samba 4.16.0rc1 release.

Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agoWHATSNEW: Up to Samba 4.16.0rc1.
Jule Anger [Mon, 24 Jan 2022 10:45:43 +0000 (11:45 +0100)]
WHATSNEW: Up to Samba 4.16.0rc1.

Signed-off-by: Jule Anger <janger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agotdb: version 1.4.6 tdb-1.4.6
Stefan Metzmacher [Mon, 24 Jan 2022 10:56:00 +0000 (11:56 +0100)]
tdb: version 1.4.6

* Use atomic operations for tdb_[increment|get]_seqnum

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jule Anger <janger@samba.org>
2 years agos4:librpc: raise log level for failed connection attempts
Björn Jacke [Sun, 23 Jan 2022 11:35:22 +0000 (12:35 +0100)]
s4:librpc: raise log level for failed connection attempts

this keeps the log files silent when other DCs are currently not running. We
saw frequent NT_STATUS_HOST_UNREACHABLE messages at log level 0 for now.

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Jan 23 12:51:44 UTC 2022 on sn-devel-184

2 years agos3:libnet: Do not set ADS_AUTH_ALLOW_NTLMSSP in FIPS mode
Pavel Filipenský [Fri, 21 Jan 2022 11:01:33 +0000 (12:01 +0100)]
s3:libnet: Do not set ADS_AUTH_ALLOW_NTLMSSP in FIPS mode

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jan 22 00:27:52 UTC 2022 on sn-devel-184

2 years agos3:winbindd: Do not set ADS_AUTH_ALLOW_NTLMSSP in FIPS mode
Pavel Filipenský [Tue, 18 Jan 2022 18:44:54 +0000 (19:44 +0100)]
s3:winbindd: Do not set ADS_AUTH_ALLOW_NTLMSSP in FIPS mode

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:winbindd: Remove trailing spaces from winbindd_ads.c
Pavel Filipenský [Tue, 18 Jan 2022 18:47:38 +0000 (19:47 +0100)]
s3:winbindd: Remove trailing spaces from winbindd_ads.c

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

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:selftest: plan test suite samba4.blackbox.test_weak_disable_ntlmssp_ldap
Pavel Filipenský [Tue, 4 Jan 2022 11:00:20 +0000 (12:00 +0100)]
s4:selftest: plan test suite samba4.blackbox.test_weak_disable_ntlmssp_ldap

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

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests: Add test for disabling NTLMSSP for ldap client connections
Pavel Filipenský [Mon, 3 Jan 2022 14:33:46 +0000 (15:33 +0100)]
tests: Add test for disabling NTLMSSP for ldap client connections

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

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:libads: Disable NTLMSSP if not allowed (for builds without kerberos)
Pavel Filipenský [Mon, 3 Jan 2022 10:13:06 +0000 (11:13 +0100)]
s3:libads: Disable NTLMSSP if not allowed (for builds without kerberos)

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:libads: Improve debug messages for SASL bind
Pavel Filipenský [Fri, 7 Jan 2022 09:31:19 +0000 (10:31 +0100)]
s3:libads: Improve debug messages for SASL bind

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:libads: Disable NTLMSSP for FIPS
Pavel Filipenský [Thu, 9 Dec 2021 12:43:08 +0000 (13:43 +0100)]
s3:libads: Disable NTLMSSP for FIPS

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:libads: Remove trailing spaces from sasl.c
Pavel Filipenský [Wed, 8 Dec 2021 15:05:17 +0000 (16:05 +0100)]
s3:libads: Remove trailing spaces from sasl.c

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

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos3:utils: set ads->auth.flags using krb5_state
Pavel Filipenský [Fri, 10 Dec 2021 15:08:04 +0000 (16:08 +0100)]
s3:utils: set ads->auth.flags using krb5_state

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

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agowafsamba: Add our own implmentation to generate the clangdb
Stefan Metzmacher [Fri, 21 Jan 2022 16:06:15 +0000 (17:06 +0100)]
wafsamba: Add our own implmentation to generate the clangdb

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agowafsamba: Remove clangdb code which doesn't work
Stefan Metzmacher [Fri, 21 Jan 2022 16:05:57 +0000 (17:05 +0100)]
wafsamba: Remove clangdb code which doesn't work

This generates an incomplete database where defines and includes are missing.

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agobuild: Without getrandom() require gnutls 3.7.2
Volker Lendecke [Mon, 17 Jan 2022 09:49:13 +0000 (10:49 +0100)]
build: Without getrandom() require gnutls 3.7.2

gnutls before 3.7.2 and without getrandom() will open /dev/urandom at library
initialization time before main() is run. We use closefrom(3) in samba-bgqd and
samba-dcerpd, which closes /dev/urandom, which then breaks gnutls. On system
with getrandom(), no file descriptor is opened and gnutls 3.7.2+ will open and
close /dev/urandom whenever it needs to access it.

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): Fri Jan 21 21:42:08 UTC 2022 on sn-devel-184

2 years agobootstrap: use compat-gnutls37-devel for centos7
Stefan Metzmacher [Thu, 20 Jan 2022 11:05:35 +0000 (12:05 +0100)]
bootstrap: use compat-gnutls37-devel for centos7

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibcli/dns: Fix TCP fallback
Volker Lendecke [Thu, 20 Jan 2022 11:23:43 +0000 (12:23 +0100)]
libcli/dns: Fix TCP fallback

A customer has come across a DNS server that really just cuts a SRV
reply if it's too long. This makes the packet invalid according to
ndr_pull and according to wireshark. DNS_FLAG_TRUNCATION is however
set. As this seems to be legal according to the DNS RFCs, we need to
hand-parse the first two uint16's and look whether DNS_FLAG_TRUNCATION
is set.

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 Jan 20 18:01:41 UTC 2022 on sn-devel-184

2 years agoautobuild: Fix path for libwbclient ldd checks
Andreas Schneider [Thu, 20 Jan 2022 10:17:29 +0000 (11:17 +0100)]
autobuild: Fix path for libwbclient ldd checks

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 20 14:19:02 UTC 2022 on sn-devel-184

2 years agos4:dsdb/vlv_pagination: fix segfault in vlv_results()
Stefan Metzmacher [Wed, 19 Jan 2022 14:57:08 +0000 (15:57 +0100)]
s4:dsdb/vlv_pagination: fix segfault in vlv_results()

It can happen that the vlv_results() failes, e.g. due to
LDB_ERR_TIME_LIMIT_EXCEEDED, if that happens we should not
dereference ares->response, if ares is NULL.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 20 10:04:39 UTC 2022 on sn-devel-184

2 years agos4:dsdb/paged_results: fix segfault in paged_results()
Stefan Metzmacher [Wed, 19 Jan 2022 14:57:08 +0000 (15:57 +0100)]
s4:dsdb/paged_results: fix segfault in paged_results()

It can happen that the paged_results() failes, e.g. due to
LDB_ERR_TIME_LIMIT_EXCEEDED, if that happens we should not
dereference ares->response, if ares is NULL.

We also should not call ldb_module_done() if paged_results()
fails, as it was already called.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2 years agoHEIMDAL: move code from source4/heimdal* to third_party/heimdal*
Stefan Metzmacher [Wed, 19 Jan 2022 12:15:45 +0000 (13:15 +0100)]
HEIMDAL: move code from source4/heimdal* to third_party/heimdal*

This makes it clearer that we always want to do heimdal changes
via the lorikeet-heimdal repository.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Joseph Sutton <jsutton@samba.org>
Autobuild-Date(master): Wed Jan 19 21:41:59 UTC 2022 on sn-devel-184

2 years agos4:torture: Adapt KDC canon test to Heimdal upstream changes
Joseph Sutton [Thu, 6 Jan 2022 03:42:33 +0000 (16:42 +1300)]
s4:torture: Adapt KDC canon test to Heimdal upstream changes

NOTE: This commit finally works again!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: Remove PAC-REQUEST check for RESPONSE_TOO_BIG
Joseph Sutton [Thu, 9 Dec 2021 00:19:27 +0000 (13:19 +1300)]
s4:torture: Remove PAC-REQUEST check for RESPONSE_TOO_BIG

Needed by the Heimdal upgrade...

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: Fix Orpheus' Lyre tests
Joseph Sutton [Fri, 10 Dec 2021 00:17:53 +0000 (13:17 +1300)]
s4:torture: Fix Orpheus' Lyre tests

The enc-pa-rep request protection allows these tests to now pass as
expected.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: Adapt LSA tests to newer Heimdal version
Joseph Sutton [Sun, 5 Dec 2021 22:10:01 +0000 (11:10 +1300)]
s4:torture: Adapt LSA tests to newer Heimdal version

The Heimdal upgrade results in some changes that affect these tests. The
cname is now non-NULL in certain circumstances, the IO counts are
different due to a change between the ordering of capaths and referrals,
some requests no longer fail, and referral tickets are not cached
anymore, and so cannot be checked.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: return ETYPE_INFO2 on PREAUTH_FAILED
Isaac Boukris [Thu, 8 Nov 2018 22:20:06 +0000 (00:20 +0200)]
s4:torture: return ETYPE_INFO2 on PREAUTH_FAILED

This is an alternative to 978bc8681e74ffa17f96fd5d4355094c4a26691c
which got overriten by the upgrade merge.
One difference however, is that we don't return ENC_TIMESTAMP like
in PREAUTH_REQUIRED but only ETYPE_INFO2 same as Windows.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoselftest: Expect FAST support for both MIT and Heimdal
Joseph Sutton [Thu, 30 Dec 2021 04:07:10 +0000 (17:07 +1300)]
selftest: Expect FAST support for both MIT and Heimdal

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoselftest: set [libdefaults] fcache_strict_checking = false
Stefan Metzmacher [Tue, 2 Feb 2016 14:40:43 +0000 (15:40 +0100)]
selftest: set [libdefaults] fcache_strict_checking = false

We're using uid_wrapper so the checks will fail.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agoselftest: knownfail updates after Heimdal Upgrade
Andrew Bartlett [Wed, 8 Dec 2021 01:56:39 +0000 (14:56 +1300)]
selftest: knownfail updates after Heimdal Upgrade

The Heimdal upgrade brings the new feature of FAST, allowing more tests to pass.

However it causes a regression in FL2003 for the returned salt format in
the AS-REP, but FL 2003 has not been the default since Samba 4.2 as AES
keys are much stronger and should be preferred.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoselftest: Update SimpleKerberosTests now that Samba supports FAST
Andrew Bartlett [Fri, 18 Jun 2021 07:41:10 +0000 (19:41 +1200)]
selftest: Update SimpleKerberosTests now that Samba supports FAST

Heimdal matches Windows in this respect

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Add option to check reply padata
Joseph Sutton [Mon, 29 Nov 2021 20:47:32 +0000 (09:47 +1300)]
tests/krb5: Add option to check reply padata

So far we have only been checking padata in error replies and with FAST.
We should also check it in the general success case.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Return PA-SUPPORTED-ENCTYPES
Joseph Sutton [Fri, 24 Dec 2021 03:59:42 +0000 (16:59 +1300)]
s4:kdc: Return PA-SUPPORTED-ENCTYPES

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Set supported enctypes in KDC entry
Joseph Sutton [Fri, 24 Dec 2021 03:59:12 +0000 (16:59 +1300)]
s4:kdc: Set supported enctypes in KDC entry

This allows us to return the supported enctypes to the client as
PA-SUPPORTED-ENCTYPES padata.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Add PAC_ATTRIBUTES integration for Heimdal
Joseph Sutton [Wed, 22 Dec 2021 04:08:43 +0000 (17:08 +1300)]
s4:kdc: Add PAC_ATTRIBUTES integration for Heimdal

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Set require_pac and no-ENC_TS in FAST for new Heimdal import
Andrew Bartlett [Tue, 14 Dec 2021 23:30:28 +0000 (12:30 +1300)]
s4:kdc: Set require_pac and no-ENC_TS in FAST for new Heimdal import

This allows us to continue to avoid CVE-2020-25719 in particular
and pass our tests for expected FAST behaviour as the patches
we requested by upstream to be conditional, not hard-coded.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc/heimdal: Always include the salt in the PA-ETYPE-INFO[2]
Andrew Bartlett [Thu, 17 Jun 2021 09:27:06 +0000 (21:27 +1200)]
s4:kdc/heimdal: Always include the salt in the PA-ETYPE-INFO[2]

This matches Windows and is detected by our samba.tests.krb5.as_canonicalization_tests
test as this always expects the salt, which Windows always provides.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: cope with upstream rename of configuration parameters.
Gary Lockyer [Thu, 21 Sep 2017 22:10:02 +0000 (10:10 +1200)]
s4:kdc: cope with upstream rename of configuration parameters.

This copes with the upstream commit:

commit c757eb7fb04a9b0ca883ddb72c1bc75bf5d814f3
Author: Nicolas Williams <nico@cryptonector.com>
Date:   Fri Nov 25 17:21:04 2011 -0600

    Rename and fix as/tgs-use-strongest-key config parameters

        Different ticket session key enctype selection options should
        distinguish between target principal type (krbtgt vs. not), not
        between KDC request types.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
[abartlet@samba.org Researched and updated the commit message]
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Move calls using the samba4 name to be right after each other
Andrew Bartlett [Tue, 18 Sep 2018 01:50:55 +0000 (18:50 -0700)]
s4:kdc: Move calls using the samba4 name to be right after each other

These all need to be in sync

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Adapt KDC to new Heimdal to load samba4 HDB plugin for keytab
Andrew Bartlett [Tue, 18 Sep 2018 01:06:35 +0000 (18:06 -0700)]
s4:kdc: Adapt KDC to new Heimdal to load samba4 HDB plugin for keytab

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc/hdb: Store and retrieve a FX-COOKIE value
Andrew Bartlett [Thu, 20 Sep 2018 02:24:11 +0000 (19:24 -0700)]
s4:kdc/hdb: Store and retrieve a FX-COOKIE value

Note Windows uses the string "MICROSOFT" as cookie,
so it's wrong to have a per DC cookie, but we need to
adjust the Heimdal logic to support that.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Set entry.flags.force_canonicalize to override the new Heimdal behaviour
Andrew Bartlett [Tue, 22 Jun 2021 23:35:01 +0000 (11:35 +1200)]
s4:kdc: Set entry.flags.force_canonicalize to override the new Heimdal behaviour

This is needed to give hdb_samba4 the full control over the returned
principal, rather than the new code in the Heimdal KDC.

Including changes selected from code by Stefan Metzmacher <metze@samba.org>
in his Heimdal upgrade branch.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kerberos: adapt the heimdal send_to_kdc hooks to the send_to_kdc/realm plugin...
Stefan Metzmacher [Wed, 3 Feb 2016 13:58:47 +0000 (14:58 +0100)]
s4:kerberos: adapt the heimdal send_to_kdc hooks to the send_to_kdc/realm plugin interface

With the recent heimdal upgrade we better try to use the send_to_realm()
hooks as it allows us to handle the KDC lookup as well as only getting
each logical request just once in the testing code, which makes it
let dependend on the heimdal internal kdc lookup logic.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:kerberos: adjust smb_krb5_debug_wrapper() to embedded heimdal
Andrew Bartlett [Wed, 8 Dec 2021 02:30:12 +0000 (15:30 +1300)]
s4:kerberos: adjust smb_krb5_debug_wrapper() to embedded heimdal

In future we need a real configure check for Heimdal 8.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/auth_log: adjust expected authDescription for test_smb_bad_user
Stefan Metzmacher [Wed, 19 Jan 2022 16:25:00 +0000 (17:25 +0100)]
tests/auth_log: adjust expected authDescription for test_smb_bad_user

With NO_SUCH_USER we don't know if any pre-authentication was requested,
so with the new Heimdal code we now used use "AS-REQ" instead of
assuming ENC-TS Pre-authentication.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:kdc: Update to match updated Heimdal's new HDB version
Andrew Bartlett [Fri, 8 Jan 2016 01:08:18 +0000 (14:08 +1300)]
s4:kdc: Update to match updated Heimdal's new HDB version

Including updates to hook into the improved hdb_auth_status
by Stefan Metzmacher <metze@samba.org> from his Heimdal
upgrade branch.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Adapt to use new combined windc interface in lorikeet-heimdal
Andrew Bartlett [Wed, 1 Dec 2021 22:34:24 +0000 (11:34 +1300)]
s4:kdc: Adapt to use new combined windc interface in lorikeet-heimdal

This interface is as requested by Luke Howard towards possibly merging
this feature.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Adapt wamba_wdc_check_client_access() to modern Heimdal
Andrew Bartlett [Wed, 23 Jun 2021 00:08:34 +0000 (12:08 +1200)]
s4:kdc: Adapt wamba_wdc_check_client_access() to modern Heimdal

Modern Heimdal falls back to kdc_check_flags() internally
when KRB5_PLUGIN_NO_HANDLE is returned, avoiding the need
to call back into the internal KDC APIs.

Selected from patch by by Stefan Metzmacher <metze@samba.org>
from his Heimdal upgrade branch.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Adapt samba_wdc_check_client_access() to upstream Heimdal
Joseph Sutton [Fri, 24 Dec 2021 03:58:22 +0000 (16:58 +1300)]
s4:kdc: Adapt samba_wdc_check_client_access() to upstream Heimdal

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Update samba_wdc_check_client_access() to match updated Heimdal
Andrew Bartlett [Wed, 20 May 2015 12:12:59 +0000 (14:12 +0200)]
s4:kdc: Update samba_wdc_check_client_access() to match updated Heimdal

This based on a patch in Debian by Samuel Cabrero <scabrero@zentyal.com> in Debian.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Do not encode the NTSTATUS error into a PA-DATA, just linearlise it
Günther Deschner [Thu, 15 May 2014 07:13:06 +0000 (09:13 +0200)]
s4:kdc: Do not encode the NTSTATUS error into a PA-DATA, just linearlise it

This allows another routine to do the wrapping.

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:kdc: Fix build failure by including <heimbase.h>
Joseph Sutton [Fri, 24 Dec 2021 03:57:42 +0000 (16:57 +1300)]
s4:kdc: Fix build failure by including <heimbase.h>

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests: Update latin1 list and ignored file list for new Heimdal import
Andrew Bartlett [Mon, 29 Nov 2021 02:36:37 +0000 (15:36 +1300)]
tests: Update latin1 list and ignored file list for new Heimdal import

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:heimdal_build: changes required to build after import
Andrew Bartlett [Tue, 7 Dec 2021 03:34:54 +0000 (16:34 +1300)]
s4:heimdal_build: changes required to build after import

For libtommath we do this by using the list from makefile.commo
in in libtommath rather than trying to match the list by hand.

This will be easier to maintain over the long term.

Thanks to work over many years by:
 - Gary Lockyer <gary@catalyst.net.nz>
 - Stefan Metzmacher <metze@samba.org>
 - Andrew Bartlett <abartlet@samba.org>

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:heimdal: import lorikeet-heimdal-202201172009 (commit 5a0b45cd723628b3690ea848548b...
Stefan Metzmacher [Fri, 24 Dec 2021 00:52:32 +0000 (01:52 +0100)]
s4:heimdal: import lorikeet-heimdal-202201172009 (commit 5a0b45cd723628b3690ea848548b05771c40f14e)

See
https://git.samba.org/?p=lorikeet-heimdal.git;a=shortlog;h=refs/heads/lorikeet-heimdal-202201172009
or
https://gitlab.com/samba-team/devel/lorikeet-heimdal/-/tree/lorikeet-heimdal-202201172009

NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!

Pair-Programmed-With: Joseph Sutton <josephsutton@catalyst.net.nz>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:heimdal_build: include heimdal headers relative to heimdal_build
Stefan Metzmacher [Wed, 19 Jan 2022 12:26:41 +0000 (13:26 +0100)]
s4:heimdal_build: include heimdal headers relative to heimdal_build

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agonetlogon.idl: Add FAST support bits
Joseph Sutton [Fri, 24 Dec 2021 03:57:00 +0000 (16:57 +1300)]
netlogon.idl: Add FAST support bits

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agogitlab-ci: Use Fedora 34 for Coverity Scan
Andreas Schneider [Tue, 18 Jan 2022 09:58:32 +0000 (10:58 +0100)]
gitlab-ci: Use Fedora 34 for Coverity Scan

The Coverity Scan tools are not updated very often and miss support for the
latest gcc build. Lets use Fedora 34 for that and stay behind a bit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 19 10:49:18 UTC 2022 on sn-devel-184

2 years agosmbd: Remove a duplicate protoype
Volker Lendecke [Sun, 16 Jan 2022 20:50:25 +0000 (21:50 +0100)]
smbd: Remove a duplicate protoype

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): Tue Jan 18 21:17:43 UTC 2022 on sn-devel-184

2 years agolib: Remove unused asprintf_strupper_m()
Volker Lendecke [Sun, 16 Jan 2022 20:23:56 +0000 (21:23 +0100)]
lib: Remove unused asprintf_strupper_m()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agowinbindd: Replace asprintf() with talloc_asprintf()
Volker Lendecke [Sun, 16 Jan 2022 20:21:00 +0000 (21:21 +0100)]
winbindd: Replace asprintf() with talloc_asprintf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibads: Convert sitename_key() to talloc
Volker Lendecke [Sun, 16 Jan 2022 20:16:02 +0000 (21:16 +0100)]
libads: Convert sitename_key() to talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agonet: Align a few integer types
Volker Lendecke [Sun, 16 Jan 2022 19:51:51 +0000 (20:51 +0100)]
net: Align a few integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolibsmb: Avoid a cast
Volker Lendecke [Sun, 16 Jan 2022 19:14:56 +0000 (20:14 +0100)]
libsmb: Avoid a cast

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Align a few integer types
Volker Lendecke [Sun, 2 Jan 2022 18:33:07 +0000 (19:33 +0100)]
smbd: Align a few integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Fix a typo
Volker Lendecke [Sat, 8 Jan 2022 15:36:51 +0000 (16:36 +0100)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agotorture3: Align two integer types
Volker Lendecke [Sat, 8 Jan 2022 15:29:58 +0000 (16:29 +0100)]
torture3: Align two integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agorpc_host: We have tevent_req_oom() for ENOMEM
Volker Lendecke [Tue, 4 Jan 2022 12:02:25 +0000 (13:02 +0100)]
rpc_host: We have tevent_req_oom() for ENOMEM

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolib: Remove unused tstream_npa_socketpair()
Volker Lendecke [Mon, 3 Jan 2022 12:33:22 +0000 (13:33 +0100)]
lib: Remove unused tstream_npa_socketpair()

This was used in the pre samba-dcerpcd source3 rpc server.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolib: Save a few lines with str_list_add_printf()
Volker Lendecke [Wed, 12 Jan 2022 11:19:00 +0000 (12:19 +0100)]
lib: Save a few lines with str_list_add_printf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agolib: Save a few lines with str_list_add_printf()
Volker Lendecke [Wed, 12 Jan 2022 11:15:08 +0000 (12:15 +0100)]
lib: Save a few lines with str_list_add_printf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Save a few lines with str_list_add_printf()
Volker Lendecke [Wed, 12 Jan 2022 11:12:50 +0000 (12:12 +0100)]
smbd: Save a few lines with str_list_add_printf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoprinting: Save a few lines with str_list_add_printf()
Volker Lendecke [Wed, 12 Jan 2022 11:09:51 +0000 (12:09 +0100)]
printing: Save a few lines with str_list_add_printf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agoprofile3: remove an unused include
Volker Lendecke [Tue, 11 Jan 2022 15:54:05 +0000 (10:54 -0500)]
profile3: remove an unused include

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos4:kdc: improve DEBUG messages in samba_wdc_reget_pac2()
Stefan Metzmacher [Thu, 23 Dec 2021 21:44:10 +0000 (22:44 +0100)]
s4:kdc: improve DEBUG messages in samba_wdc_reget_pac2()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Joseph Sutton <jsutton@samba.org>
Autobuild-Date(master): Mon Jan 17 20:55:41 UTC 2022 on sn-devel-184

2 years agos4:auth: debug make_user_info_dc_pac() failures in kerberos_pac_to_user_info_dc()
Stefan Metzmacher [Thu, 23 Dec 2021 21:53:13 +0000 (22:53 +0100)]
s4:auth: debug make_user_info_dc_pac() failures in kerberos_pac_to_user_info_dc()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:torture: check for pac_blob==NULL in test_generate_session_info_pac() functions
Stefan Metzmacher [Fri, 24 Dec 2021 14:21:21 +0000 (15:21 +0100)]
s4:torture: check for pac_blob==NULL in test_generate_session_info_pac() functions

We should return an error instead of crashing for tickets without a PAC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agos4:heimdal_build: make version_script optional to HEIMDAL_LIBRARY()
Stefan Metzmacher [Thu, 23 Dec 2021 18:29:06 +0000 (19:29 +0100)]
s4:heimdal_build: make version_script optional to HEIMDAL_LIBRARY()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2 years agokdc: Fix leak
Joseph Sutton [Thu, 30 Dec 2021 03:20:46 +0000 (16:20 +1300)]
kdc: Fix leak

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Update supported enctype checking
Joseph Sutton [Thu, 23 Dec 2021 02:59:21 +0000 (15:59 +1300)]
tests/krb5: Update supported enctype checking

We now do not expect the claims or compound ID bits to be set unless
explicitly specified, nor the DES bits.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Add AS-REQ PAC tests
Joseph Sutton [Wed, 29 Dec 2021 04:35:09 +0000 (17:35 +1300)]
tests/krb5: Add AS-REQ PAC tests

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Check encrypted-pa-data if present
Joseph Sutton [Mon, 29 Nov 2021 20:45:13 +0000 (09:45 +1300)]
tests/krb5: Check encrypted-pa-data if present

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Add FAST enc-pa-rep tests
Joseph Sutton [Mon, 29 Nov 2021 20:42:10 +0000 (09:42 +1300)]
tests/krb5: Add FAST enc-pa-rep tests

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Adjust expected error codes
Joseph Sutton [Thu, 16 Dec 2021 01:21:18 +0000 (14:21 +1300)]
tests/krb5: Adjust expected error codes

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agotests/krb5: Generate unique UPNs for AS-REQ enterprise tests
Joseph Sutton [Wed, 15 Dec 2021 21:18:42 +0000 (10:18 +1300)]
tests/krb5: Generate unique UPNs for AS-REQ enterprise tests

This helps to avoid problems with account creation due to UPN uniqueness
constraints.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: Remove netbios realm and lowercase realm tests
Joseph Sutton [Wed, 22 Dec 2021 03:08:43 +0000 (16:08 +1300)]
s4:torture: Remove netbios realm and lowercase realm tests

Tests for these are already present in
samba.tests.krb5.as_canonicalization_tests. These tests cause problems
with an upgraded Heimdal version, and we want to stop supporting
non-canonical realm names, so this commit removes them.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agos4:torture: Make etype list variables static
Joseph Sutton [Thu, 16 Dec 2021 08:06:55 +0000 (21:06 +1300)]
s4:torture: Make etype list variables static

If they are not made static, these variables end up being used by the
Kerberos libraries after they have gone out of scope.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agobuild: reduce printf() calls in generated build_options.c
David Disseldorp [Fri, 14 Jan 2022 09:38:40 +0000 (10:38 +0100)]
build: reduce printf() calls in generated build_options.c

build_options.c is inefficient in multiple ways:
1) it's generated via one python fp.write() call per line
2) the generated code calls output() for each and every build option

This commit addresses (2), modifying write_build_options_header() and
write_build_options_footer(). write_build_options_section() could also
be collapsed into a single output() call, but this may lead to oversize
string literals, so has been left as is.

I observe no change in smbd --build-options output.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Jan 17 13:17:53 UTC 2022 on sn-devel-184

2 years agobuild: reduce fp.write calls for build_options.c generation
David Disseldorp [Fri, 14 Jan 2022 09:38:40 +0000 (10:38 +0100)]
build: reduce fp.write calls for build_options.c generation

build_options.c is inefficient in multiple ways:
1) it's generated via one python fp.write() call per line
2) the generated code calls output() for each and every build option

This commit reduces fp.write() calls for (1). I observe no change in the
generated build_options.c .

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agos3:smbd: handle --build-options without parsing smb.conf
Andreas Schneider [Thu, 13 Jan 2022 14:31:33 +0000 (15:31 +0100)]
s3:smbd: handle --build-options without parsing smb.conf

The smb.conf is parsed in post mode of a popt callback. The smbd
--build-options parameter should be handled when first encountered
to avoid requiring smb.conf presence.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2 years agoWHATSNEW: Document CTDB leader and cluster lock changes
Martin Schwenke [Fri, 14 Jan 2022 02:39:34 +0000 (13:39 +1100)]
WHATSNEW: Document CTDB leader and cluster lock changes

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): Mon Jan 17 11:16:14 UTC 2022 on sn-devel-184

2 years agoctdb-doc: Remove documentation for recovery process
Martin Schwenke [Mon, 10 Jan 2022 02:41:31 +0000 (13:41 +1100)]
ctdb-doc: Remove documentation for recovery process

This is many years out of date and recent changes make it worse.  It
is unlikely that anyone has the time to fix this in the near future,
so remove it because it is misleading.

Database recovery steps are well documented in comments in the
recovery helper.  Cluster monitoring documentation can be re-added
when things stop changing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-doc: Update example configuration migration script
Martin Schwenke [Sun, 16 Jan 2022 22:16:17 +0000 (09:16 +1100)]
ctdb-doc: Update example configuration migration script

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tests: Improve test coverage for leader role yield and elections
Martin Schwenke [Fri, 14 Jan 2022 12:09:38 +0000 (23:09 +1100)]
ctdb-tests: Improve test coverage for leader role yield and elections

Rename test, clean up node selection.  Duplicate for for banning and
removing leader capability cases.  Repeat all 3 tests without cluster
lock.

All of the standard election triggers are now tested, with and without
cluster lock.  Due to test cluster configuration limitations, the
tests without cluster lock are skipped on a real cluster.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-tests: Support commenting out local daemons configuration options
Martin Schwenke [Fri, 14 Jan 2022 02:59:25 +0000 (13:59 +1100)]
ctdb-tests: Support commenting out local daemons configuration options

Can be used to disable default options, such as cluster lock.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-config: Add configuration option [cluster] leader timeout
Martin Schwenke [Sat, 15 Jan 2022 02:02:02 +0000 (13:02 +1100)]
ctdb-config: Add configuration option [cluster] leader timeout

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-config: [legacy] recmaster capability -> [cluster] leader capability
Martin Schwenke [Mon, 10 Jan 2022 03:15:25 +0000 (14:15 +1100)]
ctdb-config: [legacy] recmaster capability -> [cluster] leader capability

Rename this configuration item and move it into the [cluster]
configuration section.

Update documentation to match.

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