samba.git
5 months agos3:tests: Fix test_kerberos in smbget tests
Andreas Schneider [Thu, 7 Dec 2023 09:51:32 +0000 (10:51 +0100)]
s3:tests: Fix test_kerberos in smbget tests

We switched to a temporary directory, so $PREFIX doesn't exist.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:tests: Pass down a normal domain user for test_smbget.sh
Andreas Schneider [Thu, 7 Dec 2023 08:45:54 +0000 (09:45 +0100)]
s3:tests: Pass down a normal domain user for test_smbget.sh

It is better to test with a normal user than administrator.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest: Add DOMAIN_ADMIN and DOMAIN_USER variables
Andreas Schneider [Fri, 8 Dec 2023 12:07:19 +0000 (13:07 +0100)]
selftest: Add DOMAIN_ADMIN and DOMAIN_USER variables

We should start using those in future. So we can distinguish which
privileges we want. Currently DC_USERNAME is the Administrator. Whatever
possible should use DOMIAN_USER instead.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest: Remove trailing tabs/white spaces in Samba4.pm
Andreas Schneider [Fri, 8 Dec 2023 12:06:27 +0000 (13:06 +0100)]
selftest: Remove trailing tabs/white spaces in Samba4.pm

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:tests: Fix authentication with smbget_user in smbget tests
Andreas Schneider [Thu, 7 Dec 2023 08:18:26 +0000 (09:18 +0100)]
s3:tests: Fix authentication with smbget_user in smbget tests

Currently the smget share is broken. We set `guest ok = yes` so if you
specify invalid names, the authentication will still succeed as we
are mapped to guest.

The smbget_user is a local ad_member user. We need to set the
workstation as the "domain" for the user.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail: move more parts to expectedfail.d/ntlm-auth
Douglas Bagnall [Fri, 8 Dec 2023 03:59:33 +0000 (16:59 +1300)]
selftest/knownfail: move more parts to expectedfail.d/ntlm-auth

Here NTLM is disabled, so failure is intended.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail: move some parts to expectedfail.d/ntlm-auth
Douglas Bagnall [Fri, 8 Dec 2023 03:58:10 +0000 (16:58 +1300)]
selftest/knownfail: move some parts to expectedfail.d/ntlm-auth

Where NETLOGON is disabled, the failure is intended.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: move encrypted_secrets to expectedfail.d
Douglas Bagnall [Fri, 8 Dec 2023 03:37:39 +0000 (16:37 +1300)]
selftest/knownfail.d: move encrypted_secrets to expectedfail.d

From the file itself:

> # The fl2000dc environment is provisioned with the --plaintext-secrets option
> # running the ecnrypted secrets tests on it and expecting them to fail.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: move ntlmv1-restrictions to expectedfail.d
Douglas Bagnall [Fri, 8 Dec 2023 03:31:34 +0000 (16:31 +1300)]
selftest/knownfail.d: move ntlmv1-restrictions to expectedfail.d

These tests have been set up to fail by smb.conf options, partly
in order to test those options.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: move samba-4.5-emulation to expectedfail.d
Douglas Bagnall [Fri, 8 Dec 2023 03:22:16 +0000 (16:22 +1300)]
selftest/knownfail.d: move samba-4.5-emulation to expectedfail.d

These tests are expected to fail because the handling of GET_ANC has
deliberately been degraded in this environment (in order to test an
upgrade path, long story).

> We now show this is in effect by the fact that tests now fail.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: move labdc to expectedfail.d
Douglas Bagnall [Fri, 8 Dec 2023 03:18:25 +0000 (16:18 +1300)]
selftest/knownfail.d: move labdc to expectedfail.d

To quote the original commit:

> Note that the rpc.echo tests for the testallowed and testdenied users
> fail, because we don't backup the secrets for these users. So these
> tests failing proves that the lab-DC testenv is correct.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: remove empty files
Douglas Bagnall [Fri, 8 Dec 2023 03:07:47 +0000 (16:07 +1300)]
selftest/knownfail.d: remove empty files

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/knownfail.d: README memntions expectedfail.d
Douglas Bagnall [Fri, 8 Dec 2023 03:06:08 +0000 (16:06 +1300)]
selftest/knownfail.d: README memntions expectedfail.d

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest: add an expectedfail directory
Douglas Bagnall [Fri, 8 Dec 2023 03:05:36 +0000 (16:05 +1300)]
selftest: add an expectedfail directory

We have some tests that are not only known to fail, but which are
intended to fail.

For example, to quote selftest/knownfail.d/dns:

> # These tests are expected to fail because we want to ensure that
> # unauthenticated updates are not permitted against the default
> # configuration, nor against an RODC

In contrast to selftest/knownfail.d/uac_objectclass_restrict, which
says:

> # All these tests need to be fixed and the entries here removed

That one should stay in selftest/knownfail.d.

Some files are mixed. For example, there are lines in
selftest/knownfail.d/smb1-tests which were added in *commits* that say

> We also need to add a knownfail (which will not be removed) for the
> new test which will fail in smb1 envs

but it is not clear to me that the whole file is expected to always
fail.

By moving some knownfails here, we allow selftest/knownfail.d to be a
bit more like a TODO list, containing things that actually constitute
failure.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest: Remove unused import
Joseph Sutton [Wed, 8 Nov 2023 21:55:24 +0000 (10:55 +1300)]
selftest: Remove unused import

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Dec  8 03:25:20 UTC 2023 on atb-devel-224

5 months agoRevert "s4:torture: Increase multichannel timeout"
Joseph Sutton [Wed, 29 Nov 2023 22:57:08 +0000 (11:57 +1300)]
Revert "s4:torture: Increase multichannel timeout"

This reverts commit c6d0df787a1f6007e1f4594f68ff1f75a46bd293.

Said commit did not help with GitLab CI timeouts, but just made the CI
pipeline take longer when the test did time out.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:ntvfs: Remove trailing whitespace
Joseph Sutton [Tue, 24 Oct 2023 03:24:03 +0000 (16:24 +1300)]
s4:ntvfs: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopymessaging: Remove trailing whitespace
Joseph Sutton [Tue, 14 Nov 2023 00:07:01 +0000 (13:07 +1300)]
pymessaging: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:kdc: Remove unused includes
Joseph Sutton [Mon, 4 Dec 2023 06:25:33 +0000 (19:25 +1300)]
s4:kdc: Remove unused includes

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:include: Fix code spelling
Joseph Sutton [Thu, 9 Nov 2023 03:02:59 +0000 (16:02 +1300)]
s4:include: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:include: Remove trailing whitespace
Joseph Sutton [Thu, 9 Nov 2023 03:02:48 +0000 (16:02 +1300)]
s4:include: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Fix code spelling
Joseph Sutton [Tue, 5 Dec 2023 03:54:44 +0000 (16:54 +1300)]
s4:dsdb: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Remove trailing whitespace
Joseph Sutton [Wed, 6 Dec 2023 01:39:45 +0000 (14:39 +1300)]
s4:dsdb: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Use portable integer constant INT64_MAX
Joseph Sutton [Mon, 4 Dec 2023 03:24:15 +0000 (16:24 +1300)]
s4:dsdb: Use portable integer constant INT64_MAX

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Use portable integer constant INT64_MAX
Joseph Sutton [Mon, 4 Dec 2023 02:00:34 +0000 (15:00 +1300)]
s4:dsdb: Use portable integer constant INT64_MAX

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Use portable integer constant INT64_MIN
Joseph Sutton [Mon, 4 Dec 2023 01:34:37 +0000 (14:34 +1300)]
s4:dsdb: Use portable integer constant INT64_MIN

Because it is written in hexadecimal, ‘0x8000000000000000LL’ is likely
going to be represented as an ‘unsigned long long int’. Negating it
actually will not change its value at all, so the unary minus achieves
nothing here.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Remove unused includes
Joseph Sutton [Mon, 4 Dec 2023 01:30:43 +0000 (14:30 +1300)]
s4:dsdb: Remove unused includes

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:dsdb: Remove trailing whitespace
Joseph Sutton [Mon, 4 Dec 2023 01:30:22 +0000 (14:30 +1300)]
s4:dsdb: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:auth: Fix code spelling
Joseph Sutton [Tue, 21 Nov 2023 02:03:55 +0000 (15:03 +1300)]
s4:auth: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:rpc_server: Fix code spelling
Joseph Sutton [Wed, 8 Nov 2023 08:08:40 +0000 (21:08 +1300)]
s3:rpc_server: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:modules: Fix code spelling
Joseph Sutton [Wed, 8 Nov 2023 03:56:58 +0000 (16:56 +1300)]
s3:modules: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:include: Fix code spelling
Joseph Sutton [Thu, 9 Nov 2023 03:02:32 +0000 (16:02 +1300)]
s3:include: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:include: Remove trailing whitespace
Joseph Sutton [Thu, 9 Nov 2023 03:02:18 +0000 (16:02 +1300)]
s3:include: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotests/krb5: Remove unused parameter
Joseph Sutton [Thu, 23 Nov 2023 03:08:00 +0000 (16:08 +1300)]
tests/krb5: Remove unused parameter

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotests/krb5: Fix indentation
Joseph Sutton [Wed, 8 Nov 2023 01:41:18 +0000 (14:41 +1300)]
tests/krb5: Fix indentation

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotests/dcerpc: Remove unused imports
Joseph Sutton [Wed, 6 Dec 2023 21:03:09 +0000 (10:03 +1300)]
tests/dcerpc: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotests/dcerpc: Correct docstring
Joseph Sutton [Wed, 6 Dec 2023 21:02:41 +0000 (10:02 +1300)]
tests/dcerpc: Correct docstring

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython:tests: Remove leftover debugging message
Joseph Sutton [Fri, 24 Nov 2023 02:03:40 +0000 (15:03 +1300)]
python:tests: Remove leftover debugging message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython:tests: Remove unused imports
Joseph Sutton [Mon, 6 Nov 2023 23:35:10 +0000 (12:35 +1300)]
python:tests: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython:tests: Remove unnecessary f‐strings
Joseph Sutton [Fri, 24 Nov 2023 01:46:56 +0000 (14:46 +1300)]
python:tests: Remove unnecessary f‐strings

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: Add missing word to comment
Joseph Sutton [Thu, 23 Nov 2023 22:39:47 +0000 (11:39 +1300)]
python: Add missing word to comment

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: Fix code spelling
Joseph Sutton [Thu, 23 Nov 2023 22:39:16 +0000 (11:39 +1300)]
python: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agogp: Remove unused import
Joseph Sutton [Mon, 16 Oct 2023 05:12:49 +0000 (18:12 +1300)]
gp: Remove unused import

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agosecurity.idl: Remove trailing whitespace
Joseph Sutton [Sun, 26 Nov 2023 23:57:30 +0000 (12:57 +1300)]
security.idl: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc: Fix code spelling
Joseph Sutton [Wed, 22 Nov 2023 01:40:31 +0000 (14:40 +1300)]
librpc: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc: Remove trailing whitespace
Joseph Sutton [Wed, 22 Nov 2023 01:39:17 +0000 (14:39 +1300)]
librpc: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: Fix code spelling
Joseph Sutton [Wed, 29 Nov 2023 19:18:49 +0000 (08:18 +1300)]
libcli/security: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: Remove unused includes
Joseph Sutton [Wed, 29 Nov 2023 19:18:31 +0000 (08:18 +1300)]
libcli/security: Remove unused includes

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoutil/data_blob: Fix code spelling
Joseph Sutton [Thu, 23 Nov 2023 03:23:51 +0000 (16:23 +1300)]
util/data_blob: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoutil/data_blob: Remove trailing whitespace
Joseph Sutton [Thu, 23 Nov 2023 03:23:29 +0000 (16:23 +1300)]
util/data_blob: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoutil/charset: Remove trailing whitespace
Joseph Sutton [Mon, 13 Nov 2023 22:02:15 +0000 (11:02 +1300)]
util/charset: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib/torture: Remove trailing whitespace
Joseph Sutton [Wed, 18 Oct 2023 23:32:35 +0000 (12:32 +1300)]
lib/torture: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotalloc: Fix documentation
Joseph Sutton [Tue, 14 Nov 2023 22:23:03 +0000 (11:23 +1300)]
talloc: Fix documentation

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib/fuzzing: Fix code spelling
Joseph Sutton [Mon, 27 Nov 2023 06:41:13 +0000 (19:41 +1300)]
lib/fuzzing: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoldb: Fix code spelling
Joseph Sutton [Mon, 4 Dec 2023 22:41:24 +0000 (11:41 +1300)]
ldb: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Remove unused Rijndael cipher header
Joseph Sutton [Tue, 5 Dec 2023 02:36:37 +0000 (15:36 +1300)]
lib:crypto: Remove unused Rijndael cipher header

The corresponding code was removed with commit
11b3c6826d19d60937f75825075fc5eb67385e11.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Remove redundant array zeroing
Joseph Sutton [Thu, 30 Nov 2023 03:20:02 +0000 (16:20 +1300)]
lib:crypto: Remove redundant array zeroing

The call to memset_s() was supposed to replace the use of
ZERO_ARRAY_LEN(), but somehow both lines have crept in.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agodocs-xml: Fix code spelling
Joseph Sutton [Wed, 15 Nov 2023 21:46:09 +0000 (10:46 +1300)]
docs-xml: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoctdb: Fix code spelling
Joseph Sutton [Thu, 23 Nov 2023 23:30:03 +0000 (12:30 +1300)]
ctdb: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoctdb: Remove trailing whitespace
Joseph Sutton [Thu, 23 Nov 2023 23:29:15 +0000 (12:29 +1300)]
ctdb: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobuildtools: Update docstring to be more accurate
Joseph Sutton [Thu, 9 Nov 2023 00:17:24 +0000 (13:17 +1300)]
buildtools: Update docstring to be more accurate

Some more possibilities for output files have been introduced since
commit e916aff9e1d44c3599c30b9ea32d03921f6403f4.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoauth:gensec: Zero digest array in error case
Joseph Sutton [Tue, 5 Dec 2023 02:47:23 +0000 (15:47 +1300)]
auth:gensec: Zero digest array in error case

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agotests/ndr: Add tests for Group Key Distribution Service blobs
Joseph Sutton [Fri, 8 Dec 2023 00:00:34 +0000 (13:00 +1300)]
tests/ndr: Add tests for Group Key Distribution Service blobs

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agogkdi.idl: Add definitions for the Group Key Distribution Service
Joseph Sutton [Mon, 13 Nov 2023 04:08:58 +0000 (17:08 +1300)]
gkdi.idl: Add definitions for the Group Key Distribution Service

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython:tests: Permit newer copyright notice
Joseph Sutton [Wed, 6 Dec 2023 03:07:54 +0000 (16:07 +1300)]
python:tests: Permit newer copyright notice

We can use an HTTPS URL (https://www.gnu.org/licenses/) now.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3:utils: Fix setting the debug level
Andreas Schneider [Wed, 6 Dec 2023 07:48:34 +0000 (08:48 +0100)]
s3:utils: Fix setting the debug level

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec  7 05:33:21 UTC 2023 on atb-devel-224

5 months agos3:tests: Add smbget test for smb://DOAMIN;user%password@server/share/file
Andreas Schneider [Tue, 5 Dec 2023 14:46:48 +0000 (15:46 +0100)]
s3:tests: Add smbget test for smb://DOAMIN;user%password@server/share/file

This is supported according to the smbget manpage!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopycredentials: Properly check type in creds.set_nt_hash() and samr.encrypt_samr_passw...
Andrew Bartlett [Thu, 7 Dec 2023 02:50:43 +0000 (15:50 +1300)]
pycredentials: Properly check type in creds.set_nt_hash() and samr.encrypt_samr_password()

We should not be just doing a talloc type check, we should check the python
type first.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
6 months agos3:auth: Allow 'Unix Users' and 'Unix Groups' to create a local token
Andreas Schneider [Thu, 30 Nov 2023 09:54:07 +0000 (10:54 +0100)]
s3:auth: Allow 'Unix Users' and 'Unix Groups' to create a local token

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

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): Fri Dec  1 08:06:44 UTC 2023 on atb-devel-224

6 months agos3:auth: Remove trailing white spaces from auth_util.c
Andreas Schneider [Fri, 8 Sep 2023 10:50:32 +0000 (12:50 +0200)]
s3:auth: Remove trailing white spaces from auth_util.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 months agoselftest: Show that 'allow trusted domains = no' firewalls Unix User|Group
Andreas Schneider [Mon, 4 Sep 2023 14:29:46 +0000 (16:29 +0200)]
selftest: Show that 'allow trusted domains = no' firewalls Unix User|Group

UNEXPECTED(failure): samba3.blackbox.smbclient_auth.plain.local_creds.smbclient //LOCALSHARE4/forceuser_unixonly as user(simpleserver)
REASON: Exception: Exception: tree connect failed: NT_STATUS_AUTHENTICATION_FIREWALL_FAILED

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
6 months agothird_party/heimdal: import lorikeet-heimdal-202311290849 (commit 84fb4579594a5fd8f84...
Andrew Bartlett [Wed, 29 Nov 2023 09:46:28 +0000 (22:46 +1300)]
third_party/heimdal: import lorikeet-heimdal-202311290849 (commit 84fb4579594a5fd8f8462450777eb24d5832be07)

Some of our pending PRs for Heimdal were recently accepted,
so this brings in a new update (mostly improved spelling).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov 30 21:25:56 UTC 2023 on atb-devel-224

6 months agolib:crypto: Use bytearray macros
Andreas Schneider [Thu, 30 Nov 2023 07:32:45 +0000 (08:32 +0100)]
lib:crypto: Use bytearray macros

Do not use old macros which are not descriptive by the name.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
6 months agovfs_ceph: call 'ceph_fgetxattr' only if valid fd
Shachar Sharon [Thu, 16 Nov 2023 09:57:02 +0000 (11:57 +0200)]
vfs_ceph: call 'ceph_fgetxattr' only if valid fd

Align getxattr logic with the rest of xattr hooks: call ceph_fgetxattr
with appropriate io-fd when 'is_pathref' is false; otherwise, call
ceph_getxattr.

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

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Nov 30 12:32:29 UTC 2023 on atb-devel-224

6 months agopython/samba/tests: Fix incorrect super-class in cred_opt.py setUp()
Andrew Bartlett [Thu, 30 Nov 2023 00:31:33 +0000 (13:31 +1300)]
python/samba/tests: Fix incorrect super-class in cred_opt.py setUp()

This will allow TEST_DEBUG_LEVEL to work in this test.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov 30 02:03:05 UTC 2023 on atb-devel-224

6 months agopython/samba/tests: Fix incorrect superclass in test_min_domain_uid.py
Andrew Bartlett [Thu, 30 Nov 2023 00:28:56 +0000 (13:28 +1300)]
python/samba/tests: Fix incorrect superclass in test_min_domain_uid.py

This was not intentional as far as can be determined.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 months agopython: Correct Python2 super() calls that called the wrong class
Andrew Bartlett [Thu, 30 Nov 2023 00:22:18 +0000 (13:22 +1300)]
python: Correct Python2 super() calls that called the wrong class

These changes have been checked as safe as skipping a superclass
has no actual impact.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 months agopython: tests: update all super calls to python 3 style in tests
Rob van der Linde [Tue, 28 Nov 2023 03:38:22 +0000 (16:38 +1300)]
python: tests: update all super calls to python 3 style in tests

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
[abartlet@samba.org Some python2 style super() calls remain due
 to being an actual, even if reasonable, behaviour change]

6 months agopython: get rid of pointless empty overridden methods
Rob van der Linde [Tue, 28 Nov 2023 02:59:41 +0000 (15:59 +1300)]
python: get rid of pointless empty overridden methods

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agopython: Use constants from hresult.h for python constants
Andrew Bartlett [Wed, 29 Nov 2023 21:37:13 +0000 (10:37 +1300)]
python: Use constants from hresult.h for python constants

This encourages us to keep a single source for constants.

In the future this should be a generated python file like for ntstatus.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
6 months agopython: move HRES_SEC_* constants to samba module
Rob van der Linde [Tue, 28 Nov 2023 02:13:21 +0000 (15:13 +1300)]
python: move HRES_SEC_* constants to samba module

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agopython: tests: make HRES_SEC_E_* constant an int
Rob van der Linde [Wed, 29 Nov 2023 03:00:13 +0000 (16:00 +1300)]
python: tests: make HRES_SEC_E_* constant an int

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agopython: PEP275: docstrings should always use double quotes
Rob van der Linde [Tue, 28 Nov 2023 02:11:12 +0000 (15:11 +1300)]
python: PEP275: docstrings should always use double quotes

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agopython: fix missing colon around param in docstring
Rob van der Linde [Tue, 28 Nov 2023 02:02:00 +0000 (15:02 +1300)]
python: fix missing colon around param in docstring

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test vectors
Joseph Sutton [Thu, 23 Nov 2023 03:54:12 +0000 (16:54 +1300)]
lib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test vectors

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov 30 01:03:29 UTC 2023 on atb-devel-224

6 months agolib:crypto: Add ‘FixedData’ parameter to samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Wed, 29 Nov 2023 02:46:30 +0000 (15:46 +1300)]
lib:crypto: Add ‘FixedData’ parameter to samba_gnutls_sp800_108_derive_key()

Our code won’t use this, but NIST’s test vectors are based on handing a
fixed buffer to the key derivation function.

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Have samba_gnutls_sp800_108_derive_key() support various output key lengths
Joseph Sutton [Tue, 28 Nov 2023 23:44:10 +0000 (12:44 +1300)]
lib:crypto: Have samba_gnutls_sp800_108_derive_key() support various output key lengths

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Clean up HMAC handle in one place
Joseph Sutton [Tue, 28 Nov 2023 23:27:03 +0000 (12:27 +1300)]
lib:crypto: Clean up HMAC handle in one place

This is less error prone than having to ensure it’s cleaned up in every
error path.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Add missing call to gnutls_hmac_deinit()
Joseph Sutton [Tue, 28 Nov 2023 23:29:58 +0000 (12:29 +1300)]
lib:crypto: Add missing call to gnutls_hmac_deinit()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Add common out path to samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 23:28:10 +0000 (12:28 +1300)]
lib:crypto: Add common out path to samba_gnutls_sp800_108_derive_key()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Split out core of samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 22:49:19 +0000 (11:49 +1300)]
lib:crypto: Split out core of samba_gnutls_sp800_108_derive_key()

We are going to need to alter the structure of this function a little
bit.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Add tests for samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Wed, 29 Nov 2023 22:00:57 +0000 (11:00 +1300)]
lib:crypto: Add tests for samba_gnutls_sp800_108_derive_key()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Add samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 22:36:57 +0000 (11:36 +1300)]
lib:crypto: Add samba_gnutls_sp800_108_derive_key()

Rename smb2_key_derivation() to samba_gnutls_sp800_108_derive_key() and
move it to GNUTLS_HELPERS.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Remove unused variable
Joseph Sutton [Tue, 28 Nov 2023 21:43:16 +0000 (10:43 +1300)]
lib:crypto: Remove unused variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolib:crypto: Remove unused imports
Joseph Sutton [Tue, 28 Nov 2023 21:43:03 +0000 (10:43 +1300)]
lib:crypto: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolibcli/smb: Add ‘algorithm’ parameter to smb2_key_derivation()
Joseph Sutton [Thu, 23 Nov 2023 06:49:23 +0000 (19:49 +1300)]
libcli/smb: Add ‘algorithm’ parameter to smb2_key_derivation()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agolibcli/auth: Return more consistent status code on gnutls HMAC failure
Joseph Sutton [Thu, 23 Nov 2023 06:40:41 +0000 (19:40 +1300)]
libcli/auth: Return more consistent status code on gnutls HMAC failure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agoauth/gensec: Return more consistent status codes on gnutls hashing failure
Joseph Sutton [Thu, 23 Nov 2023 06:40:05 +0000 (19:40 +1300)]
auth/gensec: Return more consistent status codes on gnutls hashing failure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos4:utils: Use correct enumeration constant
Joseph Sutton [Thu, 23 Nov 2023 06:28:16 +0000 (19:28 +1300)]
s4:utils: Use correct enumeration constant

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 months agos4:utils: Remove trailing whitespace
Joseph Sutton [Thu, 23 Nov 2023 06:27:56 +0000 (19:27 +1300)]
s4:utils: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>