scabrero/samba-autobuild/.git
4 months agotests: Add a test for the idmap_nss : use_upn setting master
Samuel Cabrero [Tue, 12 Dec 2023 20:17:50 +0000 (21:17 +0100)]
tests: Add a test for the idmap_nss : use_upn setting

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agoidmap_nss: Install a messaging filter to reload the configuration
Samuel Cabrero [Tue, 12 Dec 2023 15:02:33 +0000 (16:02 +0100)]
idmap_nss: Install a messaging filter to reload the configuration

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agoidmap_nss: Add a parameter to use UPNs instead of plain names
Samuel Cabrero [Mon, 27 Nov 2023 07:05:29 +0000 (08:05 +0100)]
idmap_nss: Add a parameter to use UPNs instead of plain names

idmap config <DOMAIN> : backend = nss
idmap config <DOMAIN> : use_upn = yes|no

When translating a Unix ID to a SID the module calls get[pwu|grg]id() but the
name returned by some NSS modules might be a UPN instead of a plain name. If
the new parameter is enabled the returned name will be parsed and correctly
handled.

On the other hand, when translating a SID to a Unix ID the module first
resolves the SID to a domain + name, and then calls get[pw|gr]name() with the
plain name, or the UPN if the new parameter is enabled.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agoidmap_nss: Increase debug on failures
Samuel Cabrero [Wed, 29 Nov 2023 11:55:13 +0000 (12:55 +0100)]
idmap_nss: Increase debug on failures

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agodocs: Document idmap_nss "range" option
Samuel Cabrero [Mon, 27 Nov 2023 09:20:05 +0000 (10:20 +0100)]
docs: Document idmap_nss "range" option

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agos3:winbind: Register a messaging filter foreach domain child
Samuel Cabrero [Tue, 12 Dec 2023 14:55:20 +0000 (15:55 +0100)]
s3:winbind: Register a messaging filter foreach domain child

Instead of registering the "classic" callback for MSG_SMB_CONF_UPDATED,
install a message filter to allow other parts of the code to also
listen for this message because classic callbacks are delivered only
once (see commit a2436b67e5dd47d955a3bea2b83e0693b627ab96).

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agos3:winbind: talloc the static locator child
Samuel Cabrero [Tue, 12 Dec 2023 14:49:07 +0000 (15:49 +0100)]
s3:winbind: talloc the static locator child

Next commits will use talloc_get_type_abort() to get the reference.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agos3:winbind: talloc the static idmap child
Samuel Cabrero [Tue, 12 Dec 2023 14:44:21 +0000 (15:44 +0100)]
s3:winbind: talloc the static idmap child

Next commits will use talloc_get_type_abort() to get the reference.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 months agobuildtools: Remove ‘keep_underscore’ parameter
Joseph Sutton [Sun, 12 Nov 2023 20:44:26 +0000 (09:44 +1300)]
buildtools: Remove ‘keep_underscore’ parameter

Nothing now passes this in.

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): Mon Dec 11 02:13:39 UTC 2023 on atb-devel-224

4 months agobuildtools: Remove useless ‘keep_underscore’ parameter
Joseph Sutton [Sun, 12 Nov 2023 20:39:20 +0000 (09:39 +1300)]
buildtools: Remove useless ‘keep_underscore’ parameter

SAMBA_LIBARY()’s ‘keep_underscore’ parameter has an effect only if None
is passed in for ‘bundled_name’. However, SAMBA_PLUGIN() always passes
in a string for ‘bundled_name’. Therefore ‘keep_underscore’ will never
have any effect — remove it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 months agobuildtools: Pass through parameter ‘keep_underscore’
Joseph Sutton [Fri, 20 Oct 2023 23:08:23 +0000 (12:08 +1300)]
buildtools: Pass through parameter ‘keep_underscore’

This parameter has gone unused until now.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 months agos4:librpc: Fix code spelling
Joseph Sutton [Fri, 10 Nov 2023 21:03:20 +0000 (10:03 +1300)]
s4:librpc: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 months agobuildtools: Fix code spelling
Joseph Sutton [Sat, 21 Oct 2023 02:14:04 +0000 (15:14 +1300)]
buildtools: Fix code spelling

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 months agobuildtools: Remove unused parameter ‘env’
Joseph Sutton [Sat, 21 Oct 2023 01:13:27 +0000 (14:13 +1300)]
buildtools: Remove unused parameter ‘env’

This parameter goes unused, and nothing passes it in.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 months agos3:utils: Fix auth callback with smburl
Andreas Schneider [Wed, 6 Dec 2023 12:16:53 +0000 (13:16 +0100)]
s3:utils: Fix auth callback with smburl

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>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Dec 10 22:22:51 UTC 2023 on atb-devel-224

4 months agos3:tests: Add interactive smbget test for password entry
Andreas Schneider [Wed, 6 Dec 2023 14:58:08 +0000 (15:58 +0100)]
s3:tests: Add interactive smbget test for password entry

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>
4 months agoauth:creds: Add cli_credentials_get_domain_and_obtained()
Andreas Schneider [Wed, 6 Dec 2023 12:26:43 +0000 (13:26 +0100)]
auth:creds: Add cli_credentials_get_domain_and_obtained()

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>
4 months agoauth:creds: Fix cli_credentials_get_password_and_obtained() with callback
Andreas Schneider [Wed, 6 Dec 2023 12:06:42 +0000 (13:06 +0100)]
auth:creds: Fix cli_credentials_get_password_and_obtained() with callback

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>
4 months agoauth:creds:tests: Add test for password callback
Andreas Schneider [Wed, 6 Dec 2023 12:16:26 +0000 (13:16 +0100)]
auth:creds:tests: Add test for password callback

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>
4 months agos3:tests: Fix smbget test
Andreas Schneider [Thu, 7 Dec 2023 08:47:14 +0000 (09:47 +0100)]
s3:tests: Fix smbget test

Time to fix the smget share to not have `guest ok = yes` set. A new
[smbget_guest] will be used for guest only tests. This way we can
correctly test different authentication mechanisms.

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>
4 months agos3:tests: Remove the non-working test_kerberos_upn_denied of smbget
Andreas Schneider [Thu, 7 Dec 2023 12:11:46 +0000 (13:11 +0100)]
s3:tests: Remove the non-working test_kerberos_upn_denied of smbget

See TODO code comment for details.

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>
4 months agos3:tests: Fix the test_kerberos_trust in smbget testsuite
Andreas Schneider [Thu, 7 Dec 2023 10:43:33 +0000 (11:43 +0100)]
s3:tests: Fix the test_kerberos_trust in smbget testsuite

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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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

4 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>
4 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>
4 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

4 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>
4 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

5 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

5 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>
5 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>
5 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]