]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agos4: torture: CHECK ret value and fail if false
Noel Power [Thu, 19 Aug 2021 11:13:27 +0000 (12:13 +0100)] 
s4: torture: CHECK ret value and fail if false

If we reach 'done' with ret == false without setting
the torture result we get unexpected results e.g.

Exception: Exception: Unknown error/failure. Missing torture_fail() or torture_assert_*() call?

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agotests/krb5: Add FAST tests
Joseph Sutton [Wed, 28 Jul 2021 22:58:44 +0000 (10:58 +1200)] 
tests/krb5: Add FAST tests

Example command:

SERVER=addc STRICT_CHECKING=0 SMB_CONF_PATH=/dev/null \
KRB5_CONFIG=krb5.conf DOMAIN=ADDOMAIN REALM=ADDOM.SAMBA.EXAMPLE.COM \
ADMIN_USERNAME=Administrator ADMIN_PASSWORD=locDCpass1 \
PYTHONPATH=bin/python python/samba/tests/krb5/fast_tests.py

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 18 23:20:14 UTC 2021 on sn-devel-184

4 years agoinitial FAST tests
Gary Lockyer [Wed, 9 Jun 2021 21:56:58 +0000 (09:56 +1200)] 
initial FAST tests

Currently incomplete, and tested only against MIT Kerberos.

[abartlet@samba.org
 Originally "WIP inital FAST tests"

 Samba's general policy that we don't push WIP patches, we polish
 into a 'perfect' patch stream.

 However, I think there are good reasons to keep this patch distinct
 in this particular case.

 Gary is being modest in titling this WIP (now removed from the title
 to avoid confusion). They are not WIP in the normal sense of
 partially or untested code or random unfinished thoughts. The primary
 issue is that at that point where Gary had to finish up he had
 trouble getting FAST support enabled on Windows, so couldn't test
 against our standard reference. They are instead good, working
 initial tests written against the RFC and tested against Samba's AD DC
 in the mode backed by MIT Kerberos.

 This preserves clear authorship for the two distinct bodies of work,
 as in the next patch Joseph was able to extend and improve the tests
 significantly. ]

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check PADATA-FX-ERROR in reply
Joseph Sutton [Tue, 27 Jul 2021 02:49:58 +0000 (14:49 +1200)] 
tests/krb5: Check PADATA-FX-ERROR in reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Allow generic_check_kdc_error() to check inner FAST errors
Joseph Sutton [Wed, 28 Jul 2021 23:50:16 +0000 (11:50 +1200)] 
tests/krb5: Allow generic_check_kdc_error() to check inner FAST errors

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check PADATA-PAC-OPTIONS in reply
Joseph Sutton [Tue, 27 Jul 2021 02:50:20 +0000 (14:50 +1200)] 
tests/krb5: Check PADATA-PAC-OPTIONS in reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Make generic_check_kdc_error() also work for checking TGS replies
Joseph Sutton [Tue, 27 Jul 2021 04:29:39 +0000 (16:29 +1200)] 
tests/krb5: Make generic_check_kdc_error() also work for checking TGS replies

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Make check_rep_padata() also work for checking TGS replies
Joseph Sutton [Wed, 28 Jul 2021 08:49:25 +0000 (20:49 +1200)] 
tests/krb5: Make check_rep_padata() also work for checking TGS replies

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check PADATA-FX-COOKIE in reply
Joseph Sutton [Tue, 27 Jul 2021 02:49:12 +0000 (14:49 +1200)] 
tests/krb5: Check PADATA-FX-COOKIE in reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check PADATA-ENCRYPTED-CHALLENGE in reply
Joseph Sutton [Tue, 27 Jul 2021 02:36:56 +0000 (14:36 +1200)] 
tests/krb5: Check PADATA-ENCRYPTED-CHALLENGE in reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Adjust reply padata checking depending on whether FAST was sent
Joseph Sutton [Tue, 27 Jul 2021 04:42:26 +0000 (16:42 +1200)] 
tests/krb5: Adjust reply padata checking depending on whether FAST was sent

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check reply FAST padata if request included FAST
Joseph Sutton [Tue, 27 Jul 2021 04:31:39 +0000 (16:31 +1200)] 
tests/krb5: Check reply FAST padata if request included FAST

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check sname is krbtgt for FAST generic error
Joseph Sutton [Tue, 27 Jul 2021 04:25:39 +0000 (16:25 +1200)] 
tests/krb5: Check sname is krbtgt for FAST generic error

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add get_krbtgt_sname() method
Joseph Sutton [Mon, 26 Jul 2021 23:15:00 +0000 (11:15 +1200)] 
tests/krb5: Add get_krbtgt_sname() method

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Remove unused variables
Joseph Sutton [Tue, 27 Jul 2021 04:26:06 +0000 (16:26 +1200)] 
tests/krb5: Remove unused variables

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Don't expect RC4 in ETYPE-INFO2 for a non-error reply
Joseph Sutton [Tue, 27 Jul 2021 04:35:32 +0000 (16:35 +1200)] 
tests/krb5: Don't expect RC4 in ETYPE-INFO2 for a non-error reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add check_rep_padata() method to check padata in reply
Joseph Sutton [Tue, 27 Jul 2021 04:21:14 +0000 (16:21 +1200)] 
tests/krb5: Add check_rep_padata() method to check padata in reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add generate_simple_fast() method to generate FX-FAST padata
Joseph Sutton [Tue, 27 Jul 2021 03:20:09 +0000 (15:20 +1200)] 
tests/krb5: Add generate_simple_fast() method to generate FX-FAST padata

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Include authdata in kdc_exchange_dict
Joseph Sutton [Tue, 27 Jul 2021 02:18:29 +0000 (14:18 +1200)] 
tests/krb5: Include authdata in kdc_exchange_dict

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add expected_cname_private parameter to kdc_exchange_dict
Joseph Sutton [Tue, 27 Jul 2021 02:05:59 +0000 (14:05 +1200)] 
tests/krb5: Add expected_cname_private parameter to kdc_exchange_dict

This is useful for testing the 'hide client names' FAST option.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check encrypted-pa-data
Joseph Sutton [Tue, 27 Jul 2021 02:34:49 +0000 (14:34 +1200)] 
tests/krb5: Check encrypted-pa-data

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add methods to determine whether elements were included in the request
Joseph Sutton [Tue, 27 Jul 2021 03:21:01 +0000 (15:21 +1200)] 
tests/krb5: Add methods to determine whether elements were included in the request

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add functions to get dicts of request padata
Joseph Sutton [Tue, 27 Jul 2021 03:20:44 +0000 (15:20 +1200)] 
tests/krb5: Add functions to get dicts of request padata

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check FAST response
Joseph Sutton [Tue, 27 Jul 2021 02:42:57 +0000 (14:42 +1200)] 
tests/krb5: Check FAST response

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add method to verify ticket checksum for FAST
Joseph Sutton [Tue, 27 Jul 2021 02:10:13 +0000 (14:10 +1200)] 
tests/krb5: Add method to verify ticket checksum for FAST

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add method to check PA-FX-FAST-REPLY
Joseph Sutton [Tue, 27 Jul 2021 02:04:37 +0000 (14:04 +1200)] 
tests/krb5: Add method to check PA-FX-FAST-REPLY

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Allow specifying parameters specific to the outer request body
Joseph Sutton [Tue, 27 Jul 2021 02:01:36 +0000 (14:01 +1200)] 
tests/krb5: Allow specifying parameters specific to the outer request body

This is useful for testing FAST.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add FAST armor generation to _generic_kdc_exchange()
Joseph Sutton [Wed, 28 Jul 2021 22:33:24 +0000 (10:33 +1200)] 
tests/krb5: Add FAST armor generation to _generic_kdc_exchange()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Modify generate_ap_req() to also generate FAST armor AP-REQ
Joseph Sutton [Wed, 28 Jul 2021 22:33:10 +0000 (10:33 +1200)] 
tests/krb5: Modify generate_ap_req() to also generate FAST armor AP-REQ

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Include authenticator_subkey in AS-REQ exchange dict
Joseph Sutton [Wed, 28 Jul 2021 22:19:46 +0000 (10:19 +1200)] 
tests/krb5: Include authenticator_subkey in AS-REQ exchange dict

This is needed for FAST.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Rename generic_check_as_error() to generic_check_kdc_error()
Joseph Sutton [Wed, 28 Jul 2021 08:49:12 +0000 (20:49 +1200)] 
tests/krb5: Rename generic_check_as_error() to generic_check_kdc_error()

This method will also be useful in checking TGS-REP error replies.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add methods to calculate keys for FAST
Joseph Sutton [Tue, 6 Jul 2021 00:49:05 +0000 (12:49 +1200)] 
tests/krb5: Add methods to calculate keys for FAST

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add method to generate FAST encrypted challenge padata
Joseph Sutton [Tue, 6 Jul 2021 00:47:18 +0000 (12:47 +1200)] 
tests/krb5: Add method to generate FAST encrypted challenge padata

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add more methods to create ASN1 objects for FAST
Joseph Sutton [Mon, 5 Jul 2021 22:23:26 +0000 (10:23 +1200)] 
tests/krb5: Add more methods to create ASN1 objects for FAST

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add more ASN1 definitions for FAST
Joseph Sutton [Mon, 5 Jul 2021 22:21:07 +0000 (10:21 +1200)] 
tests/krb5: Add more ASN1 definitions for FAST

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Generate AP-REQ for TGS request in _generic_kdc_exchange()
Joseph Sutton [Tue, 27 Jul 2021 01:59:36 +0000 (13:59 +1200)] 
tests/krb5: Generate AP-REQ for TGS request in _generic_kdc_exchange()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Ensure generated padata is not None
Joseph Sutton [Mon, 26 Jul 2021 23:06:35 +0000 (11:06 +1200)] 
tests/krb5: Ensure generated padata is not None

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add generate_ap_req() method
Joseph Sutton [Wed, 28 Jul 2021 07:27:02 +0000 (19:27 +1200)] 
tests/krb5: Add generate_ap_req() method

This method will be useful to generate an AP-REQ for use as FAST armor.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check nonce in EncKDCRepPart
Joseph Sutton [Tue, 27 Jul 2021 00:52:42 +0000 (12:52 +1200)] 
tests/krb5: Check nonce in EncKDCRepPart

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Make checking less strict
Joseph Sutton [Mon, 26 Jul 2021 23:39:37 +0000 (11:39 +1200)] 
tests/krb5: Make checking less strict

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check version number of obtained ticket
Joseph Sutton [Mon, 26 Jul 2021 23:34:19 +0000 (11:34 +1200)] 
tests/krb5: Check version number of obtained ticket

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Assert that more variables are not None
Joseph Sutton [Tue, 27 Jul 2021 02:39:42 +0000 (14:39 +1200)] 
tests/krb5: Assert that more variables are not None

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Ensure in assertElementPresent() that container elements are not empty
Joseph Sutton [Mon, 26 Jul 2021 22:37:48 +0000 (10:37 +1200)] 
tests/krb5: Ensure in assertElementPresent() that container elements are not empty

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Only allow specifying one of check_rep_fn and check_error_fn
Joseph Sutton [Mon, 26 Jul 2021 23:06:15 +0000 (11:06 +1200)] 
tests/krb5: Only allow specifying one of check_rep_fn and check_error_fn

This means that there can no longer be surprises where a test receives a
reply when it was expecting an error, or vice versa.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Include kdc_options in kdc_exchange_dict
Joseph Sutton [Mon, 26 Jul 2021 22:35:40 +0000 (10:35 +1200)] 
tests/krb5: Include kdc_options in kdc_exchange_dict

Make kdc_options an element of kdc_exchange_dict instead of a parameter
to _generic_kdc_exchange(). This allows testing code to adjust the reply
checking based on the options that were specified in the request.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Always specify expected error code
Joseph Sutton [Mon, 26 Jul 2021 22:32:52 +0000 (10:32 +1200)] 
tests/krb5: Always specify expected error code

Now the expected error code is always determined by the test code itself
rather than by generic_check_as_error().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add check_reply() method to check for AS or TGS reply
Joseph Sutton [Mon, 26 Jul 2021 05:19:04 +0000 (17:19 +1200)] 
tests/krb5: Add check_reply() method to check for AS or TGS reply

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add method to calculate account salt
Joseph Sutton [Thu, 22 Jul 2021 04:22:09 +0000 (16:22 +1200)] 
tests/krb5: Add method to calculate account salt

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add more methods for obtaining machine and service credentials
Joseph Sutton [Mon, 5 Jul 2021 22:19:57 +0000 (10:19 +1200)] 
tests/krb5: Add more methods for obtaining machine and service credentials

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Allow specifying additional details when creating an account
Joseph Sutton [Mon, 5 Jul 2021 23:25:55 +0000 (11:25 +1200)] 
tests/krb5: Allow specifying additional details when creating an account

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Use encryption with admin credentials
Joseph Sutton [Tue, 3 Aug 2021 03:58:19 +0000 (15:58 +1200)] 
tests/krb5: Use encryption with admin credentials

This ensures that account creation using admin credentials succeeds.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add get_EpochFromKerberosTime()
Joseph Sutton [Thu, 22 Jul 2021 04:27:17 +0000 (16:27 +1200)] 
tests/krb5: Add get_EpochFromKerberosTime()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Make _test_as_exchange() return value more consistent
Joseph Sutton [Tue, 27 Jul 2021 02:27:47 +0000 (14:27 +1200)] 
tests/krb5: Make _test_as_exchange() return value more consistent

Always return the reply and the kdc_exchange_dict so that the caller has
more potentially useful information.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add method to return dict containing padata elements
Joseph Sutton [Tue, 6 Jul 2021 00:51:54 +0000 (12:51 +1200)] 
tests/krb5: Add method to return dict containing padata elements

This makes checking multiple padata elements easier.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Add get_enc_timestamp_pa_data_from_key()
Joseph Sutton [Mon, 26 Jul 2021 05:18:38 +0000 (17:18 +1200)] 
tests/krb5: Add get_enc_timestamp_pa_data_from_key()

This makes it easier to create encrypted timestamp padata when the key
has already been obtained.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Refactor get_pa_data()
Joseph Sutton [Mon, 5 Jul 2021 22:16:01 +0000 (10:16 +1200)] 
tests/krb5: Refactor get_pa_data()

The function now returns a single padata object rather than a list,
making it easier to combine multiple padata elements into a request. The
new name 'get_enc_timestamp_pa_data' also makes it clearer as to what
the method generates.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Allow cf2 to automatically use the enctype of the first key
Joseph Sutton [Mon, 5 Jul 2021 22:24:52 +0000 (10:24 +1200)] 
tests/krb5: Allow cf2 to automatically use the enctype of the first key

RFC6113 states: "Unless otherwise specified, the resulting enctype of
KRB-FX-CF2 is the enctype of k1." This change means the enctype no
longer has to be specified manually.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Use credentials kvno when creating password key
Joseph Sutton [Mon, 5 Jul 2021 23:28:37 +0000 (11:28 +1200)] 
tests/krb5: Use credentials kvno when creating password key

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Check Kerberos protocol version number
Joseph Sutton [Tue, 27 Jul 2021 03:07:59 +0000 (15:07 +1200)] 
tests/krb5: Check Kerberos protocol version number

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Expect e-data except when the error code is KDC_ERR_GENERIC
Joseph Sutton [Wed, 28 Jul 2021 05:00:09 +0000 (17:00 +1200)] 
tests/krb5: Expect e-data except when the error code is KDC_ERR_GENERIC

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix encpart_decryption_key with MIT KDC
Joseph Sutton [Tue, 27 Jul 2021 02:06:29 +0000 (14:06 +1200)] 
tests/krb5: Fix encpart_decryption_key with MIT KDC

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix callback_dict parameter
Joseph Sutton [Mon, 26 Jul 2021 23:12:34 +0000 (11:12 +1200)] 
tests/krb5: Fix callback_dict parameter

Items contained in a default-created callback_dict should not be carried
over between unrelated calls to {as,tgs}_as_exchange_dict().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix including enc-authorization-data
Joseph Sutton [Mon, 26 Jul 2021 05:14:08 +0000 (17:14 +1200)] 
tests/krb5: Fix including enc-authorization-data

Remove the EncAuthorizationData parameters from AS_REQ_create(), since
it should only be present in the TGS-REQ form. Also, fix a call to
EncryptedData_create() to supply the key usage when creating
enc-authorization-data.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Remove magic constants
Joseph Sutton [Tue, 27 Jul 2021 01:49:27 +0000 (13:49 +1200)] 
tests/krb5: Remove magic constants

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Simplify Python syntax
Joseph Sutton [Tue, 3 Aug 2021 03:03:00 +0000 (15:03 +1200)] 
tests/krb5: Simplify Python syntax

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Use more compact dict lookup
Joseph Sutton [Mon, 2 Aug 2021 05:10:32 +0000 (17:10 +1200)] 
tests/krb5: Use more compact dict lookup

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Remove unneeded statements
Joseph Sutton [Mon, 2 Aug 2021 05:01:39 +0000 (17:01 +1200)] 
tests/krb5: Remove unneeded statements

A return statement is redundant as the last statement in a method, as
methods will otherwise return None. Also, code blocks consisting of a
single 'pass' statement can be safely omitted.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: formatting
Joseph Sutton [Mon, 2 Aug 2021 05:00:09 +0000 (17:00 +1200)] 
tests/krb5: formatting

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix method name typo
Joseph Sutton [Mon, 5 Jul 2021 22:17:52 +0000 (10:17 +1200)] 
tests/krb5: Fix method name typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix comment typo
Joseph Sutton [Thu, 22 Jul 2021 04:26:17 +0000 (16:26 +1200)] 
tests/krb5: Fix comment typo

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotests/krb5: Fix ms_kile_client_principal_lookup_test errors
Joseph Sutton [Mon, 26 Jul 2021 05:15:23 +0000 (17:15 +1200)] 
tests/krb5: Fix ms_kile_client_principal_lookup_test errors

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopygensec: Don't modify Python bytes objects
Joseph Sutton [Mon, 19 Jul 2021 22:48:41 +0000 (10:48 +1200)] 
pygensec: Don't modify Python bytes objects

gensec_update() and gensec_unwrap() can both modify their input buffers
(for example, during the inplace RRC operation on GSSAPI tokens).
However, buffers obtained from Python bytes objects must not be modified
in any way. Create a copy of the input buffer so the original isn't
modified.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agopygensec: Fix memory leaks
Joseph Sutton [Mon, 19 Jul 2021 05:29:39 +0000 (17:29 +1200)] 
pygensec: Fix memory leaks

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoregistry: check for running as root in clustering mode
Ralph Boehme [Sat, 7 Aug 2021 10:52:28 +0000 (10:52 +0000)] 
registry: check for running as root in clustering mode

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14787
RN:  net conf list crashes when run as normal user

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug 17 11:23:15 UTC 2021 on sn-devel-184

4 years agos3/lib/dbwrap: check if global_messaging_context() succeeded
Ralph Boehme [Sat, 7 Aug 2021 10:51:38 +0000 (10:51 +0000)] 
s3/lib/dbwrap: check if global_messaging_context() succeeded

The subsequent messaging_ctdb_connection() will fail an assert if messaging is
not up and running, maybe it's a bit better to add a check if
global_messaging_context() actually succeeded.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotestsuite: Fix build with gcc >= 11.1.1
Andreas Schneider [Mon, 16 Aug 2021 10:42:47 +0000 (12:42 +0200)] 
testsuite: Fix build with gcc >= 11.1.1

Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 16 17:20:37 UTC 2021 on sn-devel-184

4 years agolib:replace: Remove trailing spaces from testsuite.c
Andreas Schneider [Mon, 16 Aug 2021 10:39:31 +0000 (12:39 +0200)] 
lib:replace: Remove trailing spaces from testsuite.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Print getcert message to debug
David Mulder [Fri, 23 Jul 2021 15:28:21 +0000 (09:28 -0600)] 
gpo: Print getcert message to debug

Otherwise re-running gpupdate to enforce policy
displays 'already exists' messages, which
confusingly appear to be a failure, but are
actually intentional behavior.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 13 20:06:31 UTC 2021 on sn-devel-184

4 years agogpo: Decode the bytes for cepces-submit failure
David Mulder [Thu, 22 Jul 2021 16:37:41 +0000 (10:37 -0600)] 
gpo: Decode the bytes for cepces-submit failure

When displaying the error from cepces-submit,
make sure to decode the bytes (otherwise it is
hard to read). Also print the error to debug
instead of warn (it may dump a traceback).

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Ignore symlink failure on sscep renew
David Mulder [Thu, 22 Jul 2021 16:16:42 +0000 (10:16 -0600)] 
gpo: Ignore symlink failure on sscep renew

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Apply Group Policy User Scripts
David Mulder [Tue, 20 Jul 2021 17:14:28 +0000 (11:14 -0600)] 
gpo: Apply Group Policy User Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Test Group Policy User Scripts
David Mulder [Tue, 20 Jul 2021 17:13:21 +0000 (11:13 -0600)] 
gpo: Test Group Policy User Scripts

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Enable Scripts ADMX for User Policy
David Mulder [Tue, 20 Jul 2021 19:48:42 +0000 (13:48 -0600)] 
gpo: Enable Scripts ADMX for User Policy

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agogpo: Enable user policy application
David Mulder [Tue, 20 Jul 2021 15:13:06 +0000 (09:13 -0600)] 
gpo: Enable user policy application

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolibreplace: remove now unused USE_COPY_FILE_RANGE define
Ralph Boehme [Thu, 12 Aug 2021 16:31:40 +0000 (18:31 +0200)] 
libreplace: remove now unused USE_COPY_FILE_RANGE define

The only user was removed in the previous commit. We still need the preceeding
checks however, based on that replace.c provides a copy_file_range() fallback.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14795
RN: copy_file_range() may fail with EOPNOTSUPP

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): Fri Aug 13 11:45:17 UTC 2021 on sn-devel-184

4 years agovfs_default: detect EOPNOTSUPP and ENOSYS errors from copy_file_range()
Ralph Boehme [Thu, 12 Aug 2021 16:23:21 +0000 (18:23 +0200)] 
vfs_default: detect EOPNOTSUPP and ENOSYS errors from copy_file_range()

When building in a RHEL 7 container on a RHEL 8 host, the current configure
check will detect a working SYS_copy_file_range() syscall.

Later when the resulting smbd binary is run in a RHEL 7 container on a RHEL
7 (vs 8 on the build host) host, SYS_copy_file_range() will fail with
EOPNOTSUPP.

Since the kernel support for copy_file_range() included a fallback in case
filesystems didn't implement it, the caching of copy_file_range() support can be
made a global via the static try_copy_file_range bool, there's no need to deal
with per-fileystem behaviour differences. For the curious: SYS_copy_file_range()
appeared in Linux 4.5, fallback code being vfs_copy_file_range() ->
do_splice_direct().

On current kernels the fallback function is generic_copy_file_range() (which
still calls do_splice_direct()) called from the filesystem backends directly or
from vfs_copy_file_range() -> do_copy_file_range().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
4 years agos3:winbindd: Pass the right variable to the debug message
Andreas Schneider [Wed, 11 Aug 2021 12:58:39 +0000 (14:58 +0200)] 
s3:winbindd: Pass the right variable to the debug message

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 12 20:08:25 UTC 2021 on sn-devel-184

4 years agos3:winbind: Do not start if the priviliged socket path is too long
Andreas Schneider [Wed, 11 Aug 2021 10:07:57 +0000 (12:07 +0200)] 
s3:winbind: Do not start if the priviliged socket path is too long

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agowscript: fix installing pre-commit with 'git worktree'
Stefan Metzmacher [Wed, 11 Aug 2021 11:26:41 +0000 (13:26 +0200)] 
wscript: fix installing pre-commit with 'git worktree'

.git is not always a directory, with 'git worktree' it's a file.

'git rev-parse --git-path hooks' is the generic way to find the
patch for the githooks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 12 08:56:13 UTC 2021 on sn-devel-184

4 years agoscript/bisect-test.py: add support git worktree
Stefan Metzmacher [Wed, 11 Aug 2021 11:26:41 +0000 (13:26 +0200)] 
script/bisect-test.py: add support git worktree

.git is not always a directory, with 'git worktree' it's a file.

Note we could also use 'git rev-parse --show-toplevel', but that's
a patch for another day.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agowafsamba: add support git worktree to vcs_dir_contents()
Stefan Metzmacher [Wed, 11 Aug 2021 11:26:41 +0000 (13:26 +0200)] 
wafsamba: add support git worktree to vcs_dir_contents()

.git is not always a directory, with 'git worktree' it's a file.

Note we could also use 'git rev-parse --show-toplevel', but that's
a patch for another day.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:libsmb: close the temporary IPC$ connection in cli_full_connection()
Stefan Metzmacher [Wed, 11 Aug 2021 13:30:12 +0000 (15:30 +0200)] 
s3:libsmb: close the temporary IPC$ connection in cli_full_connection()

We don't need the temporary IPC$ connection used for the
SMB1 UNIX CIFS extensions encryption setup anymore,
so we can also let the server close it.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 11 23:03:11 UTC 2021 on sn-devel-184

4 years agos3:libsmb: start encryption as soon as possible after the session setup
Stefan Metzmacher [Wed, 11 Aug 2021 12:33:24 +0000 (14:33 +0200)] 
s3:libsmb: start encryption as soon as possible after the session setup

For the SMB1 UNIX CIFS extensions we create a temporary IPC$ tcon,
if there's no tcon yet.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3: smbd: For FSCTL calls that go async, add the outstanding tevent_reqs to the aio...
Jeremy Allison [Sat, 7 Aug 2021 06:33:06 +0000 (23:33 -0700)] 
s3: smbd: For FSCTL calls that go async, add the outstanding tevent_reqs to the aio list on the file handle.

Remove knownfails.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14769
RN: smbd panic on force-close share during offload write

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): Wed Aug 11 20:02:57 UTC 2021 on sn-devel-184

4 years agos4: torture: Add test for smb2.ioctl.bug14769.
Jeremy Allison [Fri, 6 Aug 2021 17:54:31 +0000 (10:54 -0700)] 
s4: torture: Add test for smb2.ioctl.bug14769.

Add knownfails.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Call smbd_fsctl_torture_async_sleep() when we get FSCTL_SMBTORTURE_FSP_ASYN...
Jeremy Allison [Thu, 5 Aug 2021 23:07:09 +0000 (16:07 -0700)] 
s3: smbd: Call smbd_fsctl_torture_async_sleep() when we get FSCTL_SMBTORTURE_FSP_ASYNC_SLEEP.

Now all we need is the client-side test.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Add smbd_fsctl_torture_async_sleep() server-side code.
Jeremy Allison [Thu, 5 Aug 2021 23:04:38 +0000 (16:04 -0700)] 
s3: smbd: Add smbd_fsctl_torture_async_sleep() server-side code.

Commented out as not yet called.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: libcli: Add FSCTL_SMBTORTURE_FSP_ASYNC_SLEEP.
Jeremy Allison [Thu, 5 Aug 2021 18:01:44 +0000 (11:01 -0700)] 
s3: libcli: Add FSCTL_SMBTORTURE_FSP_ASYNC_SLEEP.

Prepare for async FSCTL tests on an fsp.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agos3: smbd: Split out smb2_ioctl_smbtorture() into a separate file.
Jeremy Allison [Thu, 5 Aug 2021 20:14:16 +0000 (13:14 -0700)] 
s3: smbd: Split out smb2_ioctl_smbtorture() into a separate file.

We will be adding async supporting code to this, and we don't want to
clutter up smb2_ioctl.c.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
4 years agolibreplace: properly execute SYS_copy_file_range check
Ralph Boehme [Sat, 7 Aug 2021 15:18:25 +0000 (17:18 +0200)] 
libreplace: properly execute SYS_copy_file_range check

It seems some systems (like Centos 7) have the SYS_copy_file_range define but
fail the syscall when actually being called. The current configure check is only
compiled, not run so erroneously reports a working SYS_copy_file_range.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14786
RN: Insufficient libreplace check for SYS_copy_file_range check

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 10 19:37:14 UTC 2021 on sn-devel-184