]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agos4:libcli: Require signing for SMB encryption
Andreas Schneider [Fri, 24 Jul 2020 08:18:52 +0000 (10:18 +0200)] 
s4:libcli: Require signing for SMB encryption

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:libcli: Add smb2_connect_enc_start()
Andreas Schneider [Tue, 7 Jul 2020 10:44:26 +0000 (12:44 +0200)] 
s4:libcli: Add smb2_connect_enc_start()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libcli: Split out smb2_connect_tcon_start()
Andreas Schneider [Tue, 7 Jul 2020 10:29:39 +0000 (12:29 +0200)] 
s3:libcli: Split out smb2_connect_tcon_start()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:libcli: Return if encryption is requested for SMB1
Andreas Schneider [Tue, 7 Jul 2020 10:54:26 +0000 (12:54 +0200)] 
s4:libcli: Return if encryption is requested for SMB1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:libcli: Return NTSTATUS errors for smb_composite_connect_send()
Andreas Schneider [Thu, 13 Aug 2020 14:16:55 +0000 (16:16 +0200)] 
s4:libcli: Return NTSTATUS errors for smb_composite_connect_send()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Make cli_cm_force_encryption_creds() static
Andreas Schneider [Mon, 6 Jul 2020 09:05:59 +0000 (11:05 +0200)] 
s3:libsmb: Make cli_cm_force_encryption_creds() static

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoexamples: Remove obsolete force encryption from smb2mount
Andreas Schneider [Mon, 6 Jul 2020 08:58:36 +0000 (10:58 +0200)] 
examples: Remove obsolete force encryption from smb2mount

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:rpcclient: Remove obsolete force encryption from rpcclient
Andreas Schneider [Wed, 10 Jun 2020 10:51:18 +0000 (12:51 +0200)] 
s3:rpcclient: Remove obsolete force encryption from rpcclient

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:utils: Remove obsolete force encryption from smbcquotas
Andreas Schneider [Wed, 10 Jun 2020 10:49:28 +0000 (12:49 +0200)] 
s3:utils: Remove obsolete force encryption from smbcquotas

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:utils: Remove obsolete force encryption from mdfind
Andreas Schneider [Wed, 10 Jun 2020 10:48:18 +0000 (12:48 +0200)] 
s3:utils: Remove obsolete force encryption from mdfind

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:utils: Remove obsolete force encryption from smbacls
Andreas Schneider [Wed, 10 Jun 2020 10:47:05 +0000 (12:47 +0200)] 
s3:utils: Remove obsolete force encryption from smbacls

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:client: Remove unused smb encryption code
Andreas Schneider [Wed, 10 Jun 2020 10:43:33 +0000 (12:43 +0200)] 
s3:client: Remove unused smb encryption code

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Use cli_credentials_set_smb_encryption()
Andreas Schneider [Wed, 10 Jun 2020 10:40:13 +0000 (12:40 +0200)] 
s3:libsmb: Use cli_credentials_set_smb_encryption()

This also adds a SMBC_ENCRYPTLEVEL_DEFAULT to 'enum
smbc_smb_encrypt_level' in order to use the smb.conf default value.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:net: Use cli_credentials_set_smb_encryption()
Andreas Schneider [Wed, 10 Jun 2020 10:31:02 +0000 (12:31 +0200)] 
s3:net: Use cli_credentials_set_smb_encryption()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython: Add a test for SMB encryption
Andreas Schneider [Wed, 10 Jun 2020 09:26:00 +0000 (11:26 +0200)] 
python: Add a test for SMB encryption

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Add encryption support to cli_full_connection_creds*()
Stefan Metzmacher [Mon, 8 Jun 2020 06:04:24 +0000 (08:04 +0200)] 
s3:libsmb: Add encryption support to cli_full_connection_creds*()

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3:libsmb: Remove signing_state from cli_full_connection_creds()
Andreas Schneider [Thu, 4 Jun 2020 12:59:14 +0000 (14:59 +0200)] 
s3:libsmb: Remove signing_state from cli_full_connection_creds()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Remove signing_state from cli_full_connection_creds_send()
Andreas Schneider [Thu, 28 May 2020 16:20:02 +0000 (18:20 +0200)] 
s3:libsmb: Remove signing_state from cli_full_connection_creds_send()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:client: Turn off smb signing for message op
Andreas Schneider [Thu, 28 May 2020 16:11:31 +0000 (18:11 +0200)] 
s3:client: Turn off smb signing for message op

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Use 'enum smb_signing_setting' in cliconnect.c
Andreas Schneider [Thu, 28 May 2020 15:59:19 +0000 (17:59 +0200)] 
s3:libsmb: Use 'enum smb_signing_setting' in cliconnect.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython:tests: Set smb ipc signing via the creds API
Andreas Schneider [Mon, 17 Aug 2020 10:52:39 +0000 (12:52 +0200)] 
python:tests: Set smb ipc signing via the creds API

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython:tests: Mark libsmb connection as an IPC connection
Andreas Schneider [Fri, 24 Jul 2020 07:47:11 +0000 (09:47 +0200)] 
python:tests: Mark libsmb connection as an IPC connection

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:pylibsmb: Add ipc=True support for CLI_FULL_CONNECTION_IPC
Andreas Schneider [Thu, 28 May 2020 15:29:25 +0000 (17:29 +0200)] 
s3:pylibsmb: Add ipc=True support for CLI_FULL_CONNECTION_IPC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:libsmb: Introduce CLI_FULL_CONNECTION_IPC
Andreas Schneider [Thu, 28 May 2020 15:22:12 +0000 (17:22 +0200)] 
s3:libsmb: Introduce CLI_FULL_CONNECTION_IPC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython: Set smb signing via the creds API
Andreas Schneider [Wed, 3 Jun 2020 12:02:37 +0000 (14:02 +0200)] 
python: Set smb signing via the creds API

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopython: Remove unused sign argument from smb_connection()
Andreas Schneider [Thu, 13 Aug 2020 08:40:23 +0000 (10:40 +0200)] 
python: Remove unused sign argument from smb_connection()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:lib: Set smb encryption also via cli creds API
Andreas Schneider [Wed, 10 Jun 2020 10:45:34 +0000 (12:45 +0200)] 
s3:lib: Set smb encryption also via cli creds API

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:lib: Use cli_credential_(get|set)_smb_signing()
Andreas Schneider [Wed, 27 May 2020 09:10:30 +0000 (11:10 +0200)] 
s3:lib: Use cli_credential_(get|set)_smb_signing()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Bump library version
Andreas Schneider [Thu, 23 Jul 2020 06:14:23 +0000 (08:14 +0200)] 
auth:creds: Bump library version

We added new functions so bump the version.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add python bindings for cli_credentials_set_conf()
Andreas Schneider [Thu, 4 Jun 2020 09:19:53 +0000 (11:19 +0200)] 
auth:creds: Add python bindings for cli_credentials_set_conf()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add python bindings for (get|set)_smb_encryption
Andreas Schneider [Wed, 3 Jun 2020 10:38:30 +0000 (12:38 +0200)] 
auth:creds: Add python bindings for (get|set)_smb_encryption

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add cli_credentials_(get|set)_smb_encryption()
Andreas Schneider [Thu, 28 May 2020 14:10:52 +0000 (16:10 +0200)] 
auth:creds: Add cli_credentials_(get|set)_smb_encryption()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add python bindings for (get|set)_smb_ipc_signing
Andreas Schneider [Wed, 3 Jun 2020 10:32:46 +0000 (12:32 +0200)] 
auth:creds: Add python bindings for (get|set)_smb_ipc_signing

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add cli_credentials_(get|set)_smb_ipc_signing()
Andreas Schneider [Thu, 28 May 2020 14:31:35 +0000 (16:31 +0200)] 
auth:creds: Add cli_credentials_(get|set)_smb_ipc_signing()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add python bindings for (get|set)_smb_signing
Andreas Schneider [Wed, 3 Jun 2020 09:56:01 +0000 (11:56 +0200)] 
auth:creds: Add python bindings for (get|set)_smb_signing

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Add cli_credentials_(get|set)_smb_signing()
Andreas Schneider [Tue, 26 May 2020 07:32:44 +0000 (09:32 +0200)] 
auth:creds: Add cli_credentials_(get|set)_smb_signing()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Remove unused credentials autoproto header
Andreas Schneider [Thu, 23 Jul 2020 05:47:18 +0000 (07:47 +0200)] 
auth:creds: Remove unused credentials autoproto header

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:lib: Use smb_signing_setting_translate for cmdline parsing
Andreas Schneider [Wed, 9 Oct 2019 07:47:59 +0000 (09:47 +0200)] 
s3:lib: Use smb_signing_setting_translate for cmdline parsing

The function will be removed soon.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli:smb: Add smb_encryption_setting_translate()
Andreas Schneider [Tue, 26 May 2020 06:39:34 +0000 (08:39 +0200)] 
libcli:smb: Add smb_encryption_setting_translate()

Add encryption enum and function to avoid confusion when reading the
code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli:smb: Add smb_signing_setting_translate()
Andreas Schneider [Wed, 9 Oct 2019 07:38:08 +0000 (09:38 +0200)] 
libcli:smb: Add smb_signing_setting_translate()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib:param: Add lpcfg_parse_enum_vals()
Andreas Schneider [Wed, 22 Jul 2020 15:48:25 +0000 (17:48 +0200)] 
lib:param: Add lpcfg_parse_enum_vals()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs-xml: Add 'client smb encrypt'
Andreas Schneider [Thu, 9 Apr 2020 08:38:41 +0000 (10:38 +0200)] 
docs-xml: Add 'client smb encrypt'

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: Use 'enum smb_encryption_setting' values
Andreas Schneider [Tue, 26 May 2020 07:34:54 +0000 (09:34 +0200)] 
s3:smbd: Use 'enum smb_encryption_setting' values

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoparam: Create and use enum_smb_encryption_vals
Andreas Schneider [Thu, 28 May 2020 08:04:19 +0000 (10:04 +0200)] 
param: Create and use enum_smb_encryption_vals

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoparam: Add 'server smb encrypt' parameter
Andreas Schneider [Thu, 10 Oct 2019 12:18:23 +0000 (14:18 +0200)] 
param: Add 'server smb encrypt' parameter

And this also makes 'smb encrypt' a synonym of that.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth:creds: Introduce CRED_SMB_CONF
Stefan Metzmacher [Wed, 6 Nov 2019 16:37:45 +0000 (17:37 +0100)] 
auth:creds: Introduce CRED_SMB_CONF

We have several places where we check '> CRED_UNINITIALISED',
so we better don't use CRED_UNINITIALISED for values from
our smb.conf.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibcli:smb2: Use talloc NULL context if we don't have a stackframe
Andreas Schneider [Mon, 13 Jul 2020 15:23:37 +0000 (17:23 +0200)] 
libcli:smb2: Use talloc NULL context if we don't have a stackframe

If we execute this code from python we don't have a talloc stackframe
around and segfault with talloc_tos().

To fix the crash we use the NULL context as we take care for freeing the
memory as soon as possible.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli:smb2: Do not leak ptext on error
Andreas Schneider [Mon, 13 Jul 2020 14:15:03 +0000 (16:15 +0200)] 
libcli:smb2: Do not leak ptext on error

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: Fix %U substitutions if it contains a domain name
Andreas Schneider [Mon, 17 Aug 2020 12:12:48 +0000 (14:12 +0200)] 
s3:smbd: Fix %U substitutions if it contains a domain name

'valid users = DOMAIN\%U' worked with Samba 3.6 and broke in a newer
version.

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

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 Aug 19 06:43:10 UTC 2020 on sn-devel-184

5 years agos3:tests: Add test for 'valid users = DOMAIN\%U'
Andreas Schneider [Mon, 17 Aug 2020 11:39:58 +0000 (13:39 +0200)] 
s3:tests: Add test for 'valid users = DOMAIN\%U'

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: libads: Don't re-do DNS lookups in ads_domain_func_level() if not needed.
Jeremy Allison [Thu, 23 Jul 2020 02:03:23 +0000 (19:03 -0700)] 
s3: libads: Don't re-do DNS lookups in ads_domain_func_level() if not needed.

ADS_STRUCT may be being reused after a
DC lookup from ads_find_dc(), so ads->ldap.ss may already have a
good address (even if ads->server.ldap_server == NULL).
Only re-initialize the ADS_STRUCT and redo the ads_find_fc()
DNS lookups if we have to.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug 18 09:46:28 UTC 2020 on sn-devel-184

5 years agos3: libads: Don't re-do DNS lookups in ads_current_time() if not needed.
Jeremy Allison [Thu, 23 Jul 2020 02:00:52 +0000 (19:00 -0700)] 
s3: libads: Don't re-do DNS lookups in ads_current_time() if not needed.

ADS_STRUCT may be being reused after a
DC lookup from ads_find_dc(), so ads->ldap.ss may already have a
good address (even if ads->server.ldap_server == NULL).
Only re-initialize the ADS_STRUCT and redo the ads_find_fc()
DNS lookups if we have to.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3: libads: ads_connect can be passed in an ADS_STRUCT with an existing IP address.
Jeremy Allison [Wed, 22 Jul 2020 22:35:43 +0000 (15:35 -0700)] 
s3: libads: ads_connect can be passed in an ADS_STRUCT with an existing IP address.

ads_connect can be passed in a reused ADS_STRUCT
with an existing ads->ldap.ss IP address that
is stored by going through ads_find_dc()
if ads->server.ldap_server was NULL.

If ads->server.ldap_server is still NULL but
the target address isn't a zero ip address,
then store it off before zeroing out ads->ldap
so we don't keep doing multiple calls to
ads_find_dc() in the reuse case.

If a caller wants a clean ADS_STRUCT they
will re-initialize by calling ads_init(), or
call ads_destroy() both of which ensures
ads->ldap.ss is a correctly zero'ed out IP address
by using ads_zero_ldap().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3: libads: In ads_connect(), and ads_disconnect(), replace ZERO_STRUCT(ads->ldap...
Jeremy Allison [Sat, 8 Aug 2020 03:24:07 +0000 (20:24 -0700)] 
s3: libads: In ads_connect(), and ads_disconnect(), replace ZERO_STRUCT(ads->ldap) with calls to ads_zero_ldap(ads)

This clears out the memory, but also leaves ads->ldap as a valid (zero) IPaddr.
Otherwise it's left by accident as AF_UNSPEC (0).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3: libads: Where we implicitly zero out ads->ldap in ads_init() or ads_destroy(...
Jeremy Allison [Sat, 8 Aug 2020 03:22:50 +0000 (20:22 -0700)] 
s3: libads: Where we implicitly zero out ads->ldap in ads_init() or ads_destroy() ensure we call ads_zero_ldap() after.

For ads_destroy(), this has a mode where the memory is not destroyed
but is being re-initialized. Horrid, but that's the way it works right
now.

This clears out the memory, but also leaves ads->ldap as a valid (zero) IPaddr.
Otherwise it's left by accident as AF_UNSPEC (0).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3: libads: Add utility function ads_zero_ldap().
Jeremy Allison [Sat, 8 Aug 2020 03:18:50 +0000 (20:18 -0700)] 
s3: libads: Add utility function ads_zero_ldap().

When initializing or re-initializing the ldap part of the ADS_STRUCT,
we should call this to ensure that ads->ldap.ss is correctly recognized
as a zero IPaddr by is_zero_addr(). It zeros out the ads->ldap but
then adds zero_sockaddr() to initialize as AF_INET. Otherwise it's
left by accident as AF_UNSPEC (0).

Not yet used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoctdb-recoverd: Broadcast takeover run message when verifying IPs
Martin Schwenke [Tue, 28 Jul 2020 21:02:45 +0000 (07:02 +1000)] 
ctdb-recoverd: Broadcast takeover run message when verifying IPs

This makes it consistent with the monitoring code.  If the master has
changed then this means the master will always get the message.

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): Tue Aug 18 06:24:11 UTC 2020 on sn-devel-184

5 years agoctdb-recoverd: Rename update_local_flags() -> update_flags()
Martin Schwenke [Tue, 23 Jan 2018 23:21:37 +0000 (10:21 +1100)] 
ctdb-recoverd: Rename update_local_flags() -> update_flags()

This also updates remote flags so the name is misleading.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Change update_local_flags() to use already retrieved nodemaps
Martin Schwenke [Thu, 18 Jan 2018 09:35:55 +0000 (20:35 +1100)] 
ctdb-recoverd: Change update_local_flags() to use already retrieved nodemaps

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Get remote nodemaps earlier
Martin Schwenke [Thu, 13 Jun 2019 17:51:01 +0000 (03:51 +1000)] 
ctdb-recoverd: Get remote nodemaps earlier

update_local_flags() will be changed to use these nodemaps.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Do not fetch the nodemap from the recovery master
Martin Schwenke [Thu, 13 Jun 2019 14:23:22 +0000 (00:23 +1000)] 
ctdb-recoverd: Do not fetch the nodemap from the recovery master

The nodemap has already been fetched from the local node and is
actually passed to this function.  Care must be taken to avoid
referencing the "remote" nodemap for the recovery master.  It also
isn't useful to do so, since it would be the same nodemap.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Change get_remote_nodemaps() to use connected nodes
Martin Schwenke [Thu, 18 Jan 2018 09:02:42 +0000 (20:02 +1100)] 
ctdb-recoverd: Change get_remote_nodemaps() to use connected nodes

The plan here is to use the nodemaps retrieved by get_remote_nodes()
in update_local_flags().  This will improve efficiency, since
get_remote_nodes() fetches flags from nodes in parallel.  It also
means that get_remote_nodes() can be used exactly once early on in
main_loop() to retrieve remote nodemaps.  Retrieving nodemaps multiple
times is unnecessary and racy - a single monitoring iteration should
not fetch flags multiple times and compare them.

This introduces a temporary behaviour change but it will be of no
consequence when the above changes are made.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Fix node_pnn check and assignment of nodemap into array
Martin Schwenke [Thu, 30 Jul 2020 01:57:51 +0000 (11:57 +1000)] 
ctdb-recoverd: Fix node_pnn check and assignment of nodemap into array

This array is indexed by the same index as nodemap, not the PNN.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Add fail callback to assign banning credits
Martin Schwenke [Thu, 18 Jan 2018 08:58:15 +0000 (19:58 +1100)] 
ctdb-recoverd: Add fail callback to assign banning credits

Also drop error handling in main_loop() that is replaced by this
change.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Add an intermediate state struct for nodemap fetching
Martin Schwenke [Thu, 18 Jan 2018 08:52:22 +0000 (19:52 +1100)] 
ctdb-recoverd: Add an intermediate state struct for nodemap fetching

This will allow an error callback to be added.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Move memory allocation into get_remote_nodemaps()
Martin Schwenke [Thu, 18 Jan 2018 05:31:39 +0000 (16:31 +1100)] 
ctdb-recoverd: Move memory allocation into get_remote_nodemaps()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Change signature of get_remote_nodemaps()
Martin Schwenke [Thu, 18 Jan 2018 05:41:19 +0000 (16:41 +1100)] 
ctdb-recoverd: Change signature of get_remote_nodemaps()

Change 1st argument to a rec context, since this will be needed later.
Drop the nodemap argument and access it via rec->nodemap instead.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Fix a local memory leak
Martin Schwenke [Mon, 17 Aug 2020 10:27:18 +0000 (20:27 +1000)] 
ctdb-recoverd: Fix a local memory leak

The memory is allocated off the memory context used by the current
iteration of main loop.  It is freed when main loop completes the fix
doesn't require backporting to stable branches.  However, it is sloppy
so it is worth fixing.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Basic cleanups for get_remote_nodemaps()
Martin Schwenke [Thu, 18 Jan 2018 05:19:36 +0000 (16:19 +1100)] 
ctdb-recoverd: Basic cleanups for get_remote_nodemaps()

Don't log an error on failure - let the caller can do this.  Apart
from this: fix up coding style and modernise the remaining error
message.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoWHATSNEW: list deprecated parameters
Andrew Bartlett [Tue, 16 Jun 2020 10:23:32 +0000 (22:23 +1200)] 
WHATSNEW: list deprecated parameters

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 18 01:32:21 UTC 2020 on sn-devel-184

5 years agodocs: deprecate "raw NTLMv2 auth"
Andrew Bartlett [Thu, 5 Sep 2019 04:55:35 +0000 (16:55 +1200)] 
docs: deprecate "raw NTLMv2 auth"

This parameter is appicable only to SMBv1 and we are deprecating SMBv1 specific
authentication options for possible removal.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs: deprecate "client plaintext auth"
Andrew Bartlett [Thu, 5 Sep 2019 04:55:23 +0000 (16:55 +1200)] 
docs: deprecate "client plaintext auth"

This parameter is appicable only to SMBv1 and we are deprecating SMBv1 specific
authentication options for possible removal.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs: deprecate "client NTLMv2 auth"
Andrew Bartlett [Thu, 5 Sep 2019 04:54:01 +0000 (16:54 +1200)] 
docs: deprecate "client NTLMv2 auth"

This parameter is appicable only to SMBv1 and we are deprecating SMBv1 specific
authentication options for possible removal.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs: deprecate "client lanman auth"
Andrew Bartlett [Thu, 5 Sep 2019 04:53:46 +0000 (16:53 +1200)] 
docs: deprecate "client lanman auth"

This parameter is appicable only to SMBv1 and we are deprecating SMBv1 specific
authentication options for possible removal.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs: deprecate "client use spnego"
Andrew Bartlett [Thu, 5 Sep 2019 04:53:20 +0000 (16:53 +1200)] 
docs: deprecate "client use spnego"

This parameter is appicable only to SMBv1 and we are deprecating SMBv1 specific
authentication options for possible removal.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodocs: Deprecate NT4-like domains and SMBv1-only protocol options
Andrew Bartlett [Tue, 16 Jun 2020 09:46:33 +0000 (21:46 +1200)] 
docs: Deprecate NT4-like domains and SMBv1-only protocol options

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoselftest: Do not let deprecated option warnings muck this test up
Andrew Bartlett [Mon, 10 Aug 2020 08:36:53 +0000 (20:36 +1200)] 
selftest: Do not let deprecated option warnings muck this test up

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoparam: Allow tests to silence deprecation warnings
Andrew Bartlett [Wed, 29 Jul 2020 09:26:55 +0000 (21:26 +1200)] 
param: Allow tests to silence deprecation warnings

This helps make output sensitive tests more reliable.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoselftest: Add test for suppression of deprecation warnings
Andrew Bartlett [Mon, 10 Aug 2020 00:18:07 +0000 (12:18 +1200)] 
selftest: Add test for suppression of deprecation warnings

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoauth: Fix a typo
Volker Lendecke [Wed, 12 Aug 2020 14:33:54 +0000 (16:33 +0200)] 
auth: Fix a typo

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): Mon Aug 17 20:59:51 UTC 2020 on sn-devel-184

5 years agotests: Fix typos
Volker Lendecke [Tue, 11 Aug 2020 10:34:14 +0000 (12:34 +0200)] 
tests: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoFix a comment typo copied around
Volker Lendecke [Sun, 9 Aug 2020 14:14:02 +0000 (16:14 +0200)] 
Fix a comment typo copied around

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoldap_server: Fix a typo
Volker Lendecke [Thu, 6 Aug 2020 16:39:01 +0000 (18:39 +0200)] 
ldap_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Align a few integer types
Volker Lendecke [Mon, 3 Aug 2020 19:55:51 +0000 (21:55 +0200)] 
torture: Align a few integer types

Also move a variable closer to its use

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Fix a typo
Volker Lendecke [Tue, 4 Aug 2020 07:43:28 +0000 (09:43 +0200)] 
torture: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Fix a typo
Volker Lendecke [Mon, 3 Aug 2020 19:48:41 +0000 (21:48 +0200)] 
torture: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agogensec: Fix a typo
Volker Lendecke [Wed, 22 Jul 2020 09:49:49 +0000 (11:49 +0200)] 
gensec: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoauth_log_test: Fix a typo
Volker Lendecke [Sun, 19 Jul 2020 19:38:29 +0000 (21:38 +0200)] 
auth_log_test: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotest: Fix a typo
Volker Lendecke [Mon, 29 Jun 2020 12:59:54 +0000 (14:59 +0200)] 
test: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Move get_socket_port() to its only consumer
Volker Lendecke [Fri, 17 Jul 2020 20:29:10 +0000 (22:29 +0200)] 
lib: Move get_socket_port() to its only consumer

This is only used in netbios_session_retarget()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Remove unused client_socket_port()
Volker Lendecke [Fri, 17 Jul 2020 10:56:43 +0000 (12:56 +0200)] 
lib: Remove unused client_socket_port()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Align integer types in same_net()
Volker Lendecke [Tue, 21 Jul 2020 13:45:24 +0000 (15:45 +0200)] 
lib: Align integer types in same_net()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Remove unused client_socket_addr()
Volker Lendecke [Fri, 17 Jul 2020 10:55:53 +0000 (12:55 +0200)] 
lib: Remove unused client_socket_addr()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Remove unused client_addr()
Volker Lendecke [Fri, 17 Jul 2020 10:52:15 +0000 (12:52 +0200)] 
lib: Remove unused client_addr()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Remove unused open_udp_socket()
Volker Lendecke [Fri, 17 Jul 2020 10:48:10 +0000 (12:48 +0200)] 
lib: Remove unused open_udp_socket()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Move read_udp_v4_socket() to nmbd
Volker Lendecke [Fri, 17 Jul 2020 10:40:28 +0000 (12:40 +0200)] 
lib: Move read_udp_v4_socket() to nmbd

This is the only consumer of it

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Move send_keepalive() to smbd/smb1_utils.c
Volker Lendecke [Fri, 17 Jul 2020 10:36:22 +0000 (12:36 +0200)] 
lib: Move send_keepalive() to smbd/smb1_utils.c

This is a SMB1-only packet sent from smbd only

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoldap_server: Do an early TALLOC_FREE()
Volker Lendecke [Mon, 10 Aug 2020 12:48:45 +0000 (14:48 +0200)] 
ldap_server: Do an early TALLOC_FREE()

We don't need the asn1 struct after this point anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug 17 11:10:04 UTC 2020 on sn-devel-184

5 years agoldap_server: Avoid talloc_memdup() for ldap_decode()
Volker Lendecke [Mon, 10 Aug 2020 12:47:26 +0000 (14:47 +0200)] 
ldap_server: Avoid talloc_memdup() for ldap_decode()

Slight optimization for the ldap server: We don't need to copy the
client PDU into the ASN1 struct, the decoding process happens
immediately in the same routine.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoctdb-doc: Link to CTDB page in wiki
Martin Schwenke [Sat, 8 Aug 2020 11:05:55 +0000 (21:05 +1000)] 
ctdb-doc: Link to CTDB page in wiki

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 Aug 17 06:13:11 UTC 2020 on sn-devel-184